intlayer-editor 8.7.10 → 8.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/{CodeBlockShiki-CnCV6aC8.js → CodeBlockShiki-k0O-JCEW.js} +2 -2
- package/client/dist/assets/{bundle-web-bPoImZEz.js → bundle-web-B6k7Zt6P.js} +1 -1
- package/client/dist/assets/{dist-cfqsGm74.js → dist-BuBdloo5.js} +1 -1
- package/client/dist/assets/{index-Ce-McG67.js → index-DWGMlpwn.js} +18 -18
- package/client/dist/index.html +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-k0O-JCEW.js","assets/chunk-BNv3lrIs.js","assets/bundle-web-B6k7Zt6P.js","assets/dist-BuBdloo5.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,i as t,n,r,t as i}from"./chunk-BNv3lrIs.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var a=i((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.5`})),o=i(((e,t)=>{t.exports=a()})),s=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),c=i(((e,t)=>{t.exports=s()})),l=i((e=>{var t=o();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 s(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 c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),u=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=i((e=>{var t=c(),n=o(),r=u();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 s(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 l(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(s(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return f(a),e;if(o===r)return f(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.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 m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var 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,R={pending:!1,data:null,method:null,action:null},ee=[],te=-1;function z(e){return{current:e}}function B(e){0>te||(e.current=ee[te],ee[te]=null,te--)}function V(e,t){te++,ee[te]=e.current,e.current=t}var ne=z(null),re=z(null),ie=z(null),ae=z(null);function oe(e,t){switch(V(ie,t),V(re,e),V(ne,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}}B(ne),V(ne,e)}function se(){B(ne),B(re),B(ie)}function ce(e){e.memoizedState!==null&&V(ae,e);var t=ne.current,n=Xd(t,e.type);t!==n&&(V(re,e),V(ne,n))}function le(e){re.current===e&&(B(ne),B(re)),ae.current===e&&(B(ae),op._currentValue=R)}var ue,de;function fe(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``,de=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+ue+e+de}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -53,26 +53,26 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
53
53
|
.wrapper[data-active] {
|
|
54
54
|
outline-color: inherit;
|
|
55
55
|
}
|
|
56
|
-
`,Bw=typeof HTMLElement<`u`?HTMLElement:class{},Vw=class extends Bw{_isSelecting=!1;_pressDuration=Rw;_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=zw,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?Rw: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()}},Hw=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Vw),gw(),yw(),Lw())},Uw=()=>({allowedOrigins:[b?.editorURL,b?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),Ww=0,Gw=()=>{Ww++;let e=dw();if(e)return e;let t=new Pw({mode:`client`,messenger:Uw(),configuration:x});return fw(t),Hw(),t.start(),t},Kw=()=>{Ww=Math.max(0,Ww-1),!(Ww>0)&&(dw()?.stop(),fw(null))},qw=(e,t,n)=>{let r=(0,_.c)(16),i=ew(),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,h.useState)(o),l=(0,h.useRef)(o),u=(0,h.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 Sw(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,g;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(g=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=g):g=r[11],(0,h.useEffect)(d,g);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},Jw=(e,t)=>qw(ow.INTLAYER_URL_CHANGE,e,t),Yw=()=>{let e=(0,_.c)(13),t=ew(),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,h.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,h.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},Xw=()=>{let e=(0,_.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=Yw(),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},Zw=()=>{let e=(0,_.c)(3),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a),n},Qw=(e,t,n)=>{for(let r of t)try{if(Ew(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},$w=()=>{let e=(0,_.c)(12),{localeDictionaries:t}=Yw(),n=Zw(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=nw(),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=Qw(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},eT=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,h.useRef)(null);i.current||=new Pw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,h.useEffect)(()=>(Hw(),fw(a),a.start(),()=>{a.stop(),fw(null)}),[a]),(0,w.jsx)($C,{manager:a,children:e})},tT=(0,h.createContext)(void 0),nT=()=>{let e=(0,_.c)(4),t=ew(),n=(0,h.useContext)(tT),[r,i]=(0,h.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,h.useEffect)(a,o),r??n},rT=()=>{let e=(0,_.c)(23),t=ew(),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},iT=()=>{let e=(0,_.c)(6),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a);let o=rT(),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},aT=()=>{let e=(0,_.c)(5),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},oT=()=>{let e=(0,_.c)(2),t=ew(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},sT=(e,t,n)=>{let r=(0,_.c)(11),i=ew(),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,h.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},cT=()=>{sT(ow.INTLAYER_IFRAME_CLICKED,sw)},lT=e=>{let t=(0,_.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Ew(i,n,Zw());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,w.jsx)(ZC,{value:l,onChange:d})})},uT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!NT.includes(e)).map(r=>{let i={type:A,key:r},a=[...t,i],o=n[A][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(PT,{...e,key:r,keyPath:a,section:o})]})})})},dT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!NT.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(PT,{...e,key:r,keyPath:a,section:o})]})})})},fT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,h.useState)(!1),l=(0,h.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,h.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,h.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,w.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,w.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,w.jsx)(RC,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:Zd,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,w.jsx)(RC,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Cf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,w.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,w.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,w.jsx)(RC,{label:`Edit`,Icon:gf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},pT=(...e)=>e.filter(Boolean).join(` `),mT=Rd([`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`}}),hT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,w.jsx)(`input`,{className:pT(mT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),gT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,w.jsx)(`textarea`,{className:G(`resize-none`,mT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),_T=24,vT=12,yT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,h.useRef)(null);(0,h.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=_T*r+vT,s=_T+vT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,h.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,w.jsx)(gT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})},bT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(fT,{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,w.jsx)(yT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},xT=e=>{let t=(0,_.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=Zw(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Ew(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,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,w.jsx)(bT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:ST})}),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 ST(){return null}var CT=e=>{let t=(0,_.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=iT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Ew(e.editedContent,n),s=r[M],{content:c}=r,l=[...n,{type:M}],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,w.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,w.jsx)(xT,{...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},wT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},TT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:j}],i=n[j];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},ET=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:L}],i=n[L];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},DT=(0,h.memo)(e=>{let t=(0,_.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(OT),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:N},o=[...n,i],c=hr(o,s);return(0,w.jsx)(VC,{level:n.length,title:yr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,w.jsx)(PT,{...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 OT(e){return!NT.includes(e)}var kT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(fT,{value:(0,h.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,w.jsx)(hT,{ref:i,...r})})},AT=e=>{let t=(0,_.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Zw(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Ew(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,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,w.jsx)(kT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:jT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function jT(){return null}var MT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,w.jsx)(PT,{...e,keyPath:a,section:o})},NT=[`filePath`,`id`,`nodeType`],PT=(0,h.memo)(e=>{let t=Zw(),n=(0,h.useMemo)(()=>Ew(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,h.useMemo)(()=>Mw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,w.jsx)(ET,{...e,section:n}):r===`html`?(0,w.jsx)(wT,{...e,section:n}):r===`translation`?(0,w.jsx)(MT,{...e,section:n}):r===`enumeration`?(0,w.jsx)(dT,{...e,section:n}):r===`condition`?(0,w.jsx)(uT,{...e,section:n}):r===`insertion`?(0,w.jsx)(TT,{...e,section:n}):r===`array`?(0,w.jsx)(HC,{...e,section:n}):r===`file`?(0,w.jsx)(CT,{...e,section:n}):(0,w.jsx)(DT,{...e,section:n});if(typeof n==`string`)return(0,w.jsx)(xT,{...e,section:n});if(typeof n==`number`)return(0,w.jsx)(AT,{...e,section:n});if(typeof n==`boolean`)return(0,w.jsx)(lT,{...e,section:n})}),FT=e=>{let t=(0,_.c)(6),{dictionary:n,...r}=e,i=Zw(),{editedContent:a,addEditedContent:o}=iT(),{focusedContent:s,setFocusedContentKeyPath:c}=$w(),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,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,h.createElement)(PT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},IT={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`]},LT={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},RT=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),zT=e=>e.reduce((e,t)=>{let n=e??{},r=RT(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=zT([LT,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=zT([LT.headers,...t.map(e=>e.headers)]),s=zT(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=zT(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()},BT=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
57
|
-
`);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},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})}},
|
|
58
|
-
`);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`})}},HT=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},UT=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},WT=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},GT=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},KT=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},qT=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},JT=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},YT=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},XT=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},ZT=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},QT=(e={},t=x)=>{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`})}},$T=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},eE=(e={},t)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},tE=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},nE=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function rE(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 iE(e,t,n=`.`,r){if(!rE(t))return iE(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]]:rE(a)&&rE(i[t])?i[t]=iE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function aE(e){return(...t)=>t.reduce((t,n)=>iE(t,n,``,e),{})}var oE=aE(),sE=(e={},t)=>{let n=oE(t??{},x);return{organization:YT(e,n),project:XT(e,n),user:tE(e,n),oAuth:JT(n),dictionary:UT(e,n),stripe:QT(e,n),ai:BT(e,n),audit:VT(e,n),tag:$T(e,n),search:ZT(e,n),editor:WT(e,n),newsletter:qT(e,n),github:GT(e,n),gitlab:KT(e,n),bitbucket:HT(e,n),showcaseProject:nE(e,n),translate:eE(e,n)}},cE=e=>{let t=(0,_.c)(8),n=nT(),r=e??n??x,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`oAuth2AccessToken`],t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=JT(r),t[1]=r,t[2]=a);let o=!!(r.editor.clientId&&r.editor.clientSecret),s;t[3]!==a.getOAuth2AccessToken||t[4]!==o?(s={queryKey:i,queryFn:a.getOAuth2AccessToken,enabled:o,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[3]=a.getOAuth2AccessToken,t[4]=o,t[5]=s):s=t[5];let{data:c}=pc(s),l=c?.data,u;return t[6]===l?u=t[7]:(u={oAuth2AccessToken:l},t[6]=l,t[7]=u),u};function lE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var uE=lE({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`}),dE=`1.6.9`;function fE(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 pE(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function mE(){return hE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var hE={stubThis:e=>e};function gE(e){let{id:t}=e;return{...e,id:pE(t),transports:e.transports}}function _E(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 vE=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 yE({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 vE({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 vE({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 vE({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 vE({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 vE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new vE({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 vE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new vE({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(!_E(t))return new vE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new vE({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 vE({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 vE({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 bE=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}}},xE=[`cross-platform`,`platform`];function SE(e){if(e&&!(xE.indexOf(e)<0))return e}async function CE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!mE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:pE(t.challenge),user:{...t.user,id:pE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(gE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=bE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw yE({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){wE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=fE(e))}catch(e){wE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=fE(c.getAuthenticatorData())}catch(e){wE(`getAuthenticatorData()`,e)}return{id:o,rawId:fE(s),response:{attestationObject:fE(c.attestationObject),clientDataJSON:fE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:SE(a.authenticatorAttachment)}}function wE(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 TE(){if(!mE())return EE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?EE.stubThis(new Promise(e=>e(!1))):EE.stubThis(e.isConditionalMediationAvailable())}var EE={stubThis:e=>e};function DE({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 vE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new vE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!_E(t))return new vE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new vE({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 vE({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 OE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!mE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(gE));let a={...t,challenge:pE(t.challenge),allowCredentials:i},o={};if(n){if(!await TE())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=bE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw DE({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=fE(u.userHandle)),{id:c,rawId:fE(l),response:{authenticatorData:fE(u.authenticatorData),clientDataJSON:fE(u.clientDataJSON),signature:fE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:SE(s.authenticatorAttachment)}}var kE=`1.6.9`,AE=Symbol.for(`better-auth:broadcast-channel`),jE=()=>Math.floor(Date.now()/1e3),ME=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:jE()}))}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 NE(e=`better-auth.message`){return globalThis[AE]||(globalThis[AE]=new ME(e)),globalThis[AE]}var PE=Symbol.for(`better-auth:focus-manager`),FE=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 IE(){return globalThis[PE]||(globalThis[PE]=new FE),globalThis[PE]}var LE=Symbol.for(`better-auth:online-manager`),RE=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 zE(){return globalThis[LE]||(globalThis[LE]=new RE),globalThis[LE]}var BE={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*:/},VE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,HE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},UE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function WE(e){return e instanceof Date&&!isNaN(e.getTime())}function GE(e){let t=UE.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 WE(f)?f:null}function KE(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 HE)return HE[s];if(!VE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(BE).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=GE(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function qE(e,t={strict:!0}){return KE(e,t)}var JE=[],YE=0,XE=4,ZE=0,QE=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=YE+XE;t<JE.length;)JE[t]===e?JE.splice(t,XE):t+=XE;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ZE++;let i=!JE.length;for(let i of t)JE.push(i,n.value,e,r);if(i){for(YE=0;YE<JE.length;YE+=XE)JE[YE](JE[YE+1],JE[YE+2],JE[YE+3]);JE.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},$E=5,eD=6,tD=10,nD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+tD]||(e.events[n+tD]=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+tD](),delete e.events[n+tD])}),rD=1e3,iD=(e,t)=>nD(e,n=>{let r=t(n);r&&e.events[eD].push(r)},$E,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[eD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[eD])t();e.events[eD]=[]}},rD)},()=>{e.listen=n,e.off=r}}),aD=()=>typeof window>`u`,oD=(e,t,n,r)=>{let i=QE({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()=>{aD()||(o?await a():iD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},sD=()=>Math.floor(Date.now()/1e3);function cD(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var lD=5;function uD(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||zE().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=sD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=sD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=cD(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=cD(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=sD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(sD()-c.lastSessionRequest<lD)return;c.lastSessionRequest=sD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=sD(),n.set(!n.get()))},d=e=>{NE().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=NE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=IE().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=zE().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),NE().setup(),IE().setup(),zE().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 dD=Object.create(null),fD=e=>({}),pD=new Proxy(dD,{get(e,t){return fD()[t]??dD[t]},has(e,t){return t in fD()||t in dD},set(e,t,n){let r=fD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=fD(!0);return delete n[t],!0},ownKeys(){let e=fD(!0);return Object.keys(e)}});function mD(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return mD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return mD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return mD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return mD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return mD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return mD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return mD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function hD(){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 gD(e){let t=e.split(`
|
|
56
|
+
`,Bw=typeof HTMLElement<`u`?HTMLElement:class{},Vw=class extends Bw{_isSelecting=!1;_pressDuration=Rw;_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=zw,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?Rw: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()}},Hw=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Vw),gw(),yw(),Lw())},Uw=()=>({allowedOrigins:[b?.editorURL,b?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),Ww=0,Gw=()=>{Ww++;let e=dw();if(e)return e;let t=new Pw({mode:`client`,messenger:Uw(),configuration:x});return fw(t),Hw(),t.start(),t},Kw=()=>{Ww=Math.max(0,Ww-1),!(Ww>0)&&(dw()?.stop(),fw(null))},qw=(e,t,n)=>{let r=(0,_.c)(16),i=ew(),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,h.useState)(o),l=(0,h.useRef)(o),u=(0,h.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 Sw(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,g;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(g=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=g):g=r[11],(0,h.useEffect)(d,g);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},Jw=(e,t)=>qw(ow.INTLAYER_URL_CHANGE,e,t),Yw=()=>{let e=(0,_.c)(13),t=ew(),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,h.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,h.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},Xw=()=>{let e=(0,_.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=Yw(),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},Zw=()=>{let e=(0,_.c)(3),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a),n},Qw=(e,t,n)=>{for(let r of t)try{if(Ew(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},$w=()=>{let e=(0,_.c)(12),{localeDictionaries:t}=Yw(),n=Zw(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=nw(),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=Qw(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},eT=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,h.useRef)(null);i.current||=new Pw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,h.useEffect)(()=>(Hw(),fw(a),a.start(),()=>{a.stop(),fw(null)}),[a]),(0,w.jsx)($C,{manager:a,children:e})},tT=(0,h.createContext)(void 0),nT=()=>{let e=(0,_.c)(4),t=ew(),n=(0,h.useContext)(tT),[r,i]=(0,h.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,h.useEffect)(a,o),r??n},rT=()=>{let e=(0,_.c)(23),t=ew(),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},iT=()=>{let e=(0,_.c)(6),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a);let o=rT(),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},aT=()=>{let e=(0,_.c)(5),t=ew(),[n,r]=(0,h.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,h.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},oT=()=>{let e=(0,_.c)(2),t=ew(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},sT=(e,t,n)=>{let r=(0,_.c)(11),i=ew(),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,h.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},cT=()=>{sT(ow.INTLAYER_IFRAME_CLICKED,sw)},lT=e=>{let t=(0,_.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Ew(i,n,Zw());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,w.jsx)(ZC,{value:l,onChange:d})})},uT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!NT.includes(e)).map(r=>{let i={type:A,key:r},a=[...t,i],o=n[A][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(PT,{...e,key:r,keyPath:a,section:o})]})})})},dT=e=>{let{keyPath:t,section:n}=e;return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!NT.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,h.createElement)(PT,{...e,key:r,keyPath:a,section:o})]})})})},fT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,h.useState)(!1),l=(0,h.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,h.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,h.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,w.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,w.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,w.jsx)(RC,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:Zd,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,w.jsx)(RC,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Cf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,w.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,w.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,w.jsx)(RC,{label:`Edit`,Icon:gf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},pT=(...e)=>e.filter(Boolean).join(` `),mT=Rd([`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`}}),hT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,w.jsx)(`input`,{className:pT(mT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),gT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,w.jsx)(`textarea`,{className:G(`resize-none`,mT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),_T=24,vT=12,yT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,h.useRef)(null);(0,h.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=_T*r+vT,s=_T+vT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,h.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,w.jsx)(gT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})},bT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(fT,{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,w.jsx)(yT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},xT=e=>{let t=(0,_.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=Zw(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Ew(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,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,w.jsx)(bT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:ST})}),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 ST(){return null}var CT=e=>{let t=(0,_.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=iT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Ew(e.editedContent,n),s=r[M],{content:c}=r,l=[...n,{type:M}],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,w.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,w.jsx)(xT,{...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},wT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},TT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:j}],i=n[j];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},ET=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:L}],i=n[L];return(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,w.jsx)(PT,{...e,keyPath:r,section:i})})},DT=(0,h.memo)(e=>{let t=(0,_.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(OT),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:N},o=[...n,i],c=hr(o,s);return(0,w.jsx)(VC,{level:n.length,title:yr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,w.jsx)(PT,{...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 OT(e){return!NT.includes(e)}var kT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,h.useRef)(null);return(0,h.useImperativeHandle)(n,()=>i.current),(0,w.jsx)(fT,{value:(0,h.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,w.jsx)(hT,{ref:i,...r})})},AT=e=>{let t=(0,_.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Zw(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Ew(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,w.jsx)(w.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,w.jsx)(`button`,{type:`button`,className:G(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,w.jsx)(kT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:jT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function jT(){return null}var MT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,w.jsx)(PT,{...e,keyPath:a,section:o})},NT=[`filePath`,`id`,`nodeType`],PT=(0,h.memo)(e=>{let t=Zw(),n=(0,h.useMemo)(()=>Ew(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,h.useMemo)(()=>Mw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,w.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,w.jsx)(ET,{...e,section:n}):r===`html`?(0,w.jsx)(wT,{...e,section:n}):r===`translation`?(0,w.jsx)(MT,{...e,section:n}):r===`enumeration`?(0,w.jsx)(dT,{...e,section:n}):r===`condition`?(0,w.jsx)(uT,{...e,section:n}):r===`insertion`?(0,w.jsx)(TT,{...e,section:n}):r===`array`?(0,w.jsx)(HC,{...e,section:n}):r===`file`?(0,w.jsx)(CT,{...e,section:n}):(0,w.jsx)(DT,{...e,section:n});if(typeof n==`string`)return(0,w.jsx)(xT,{...e,section:n});if(typeof n==`number`)return(0,w.jsx)(AT,{...e,section:n});if(typeof n==`boolean`)return(0,w.jsx)(lT,{...e,section:n})}),FT=e=>{let t=(0,_.c)(6),{dictionary:n,...r}=e,i=Zw(),{editedContent:a,addEditedContent:o}=iT(),{focusedContent:s,setFocusedContentKeyPath:c}=$w(),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,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,h.createElement)(PT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},IT={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`]},LT=(e,t)=>{let n=(0,_.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,h.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,h.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},RT=(0,h.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),zT=()=>(0,h.useContext)(RT),BT=e=>{let t=(0,_.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=wr(),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]=LT(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,w.jsx)(RT,{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},VT=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,h.useState)(n),[u,d]=(0,h.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(HT)},t[0]=n,t[1]=p);let m=p,g;t[2]!==c||t[3]!==r?(g=()=>{r(c)},t[2]=c,t[3]=r,t[4]=g):g=t[4];let v=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{l(e.currentTarget.value)},t[5]=y):y=t[5];let b=y,x=e=>{e.key===`Enter`&&!i&&T?(e.preventDefault(),v()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(UT)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,h.useEffect)(S,C);let T=a?.(c)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,w.jsx)(hT,{onChange:b,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!T,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{Icon:Zd,label:`Save changes${T?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!T,onClick:v,"aria-describedby":T?void 0:`validation-error`}),(0,w.jsx)(RC,{Icon:Cf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function HT(e){return e+1}function UT(e){return e+1}var WT={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},GT=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),KT=e=>e.reduce((e,t)=>{let n=e??{},r=GT(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=KT([WT,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=KT([WT.headers,...t.map(e=>e.headers)]),s=KT(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=KT(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()},qT=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
57
|
+
`);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},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})}},JT=(e={},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(`
|
|
58
|
+
`);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`})}},YT=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},XT=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},ZT=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},QT=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},$T=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},eE=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},tE=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},nE=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},rE=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},iE=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},aE=(e={},t=x)=>{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`})}},oE=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},sE=(e={},t)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},cE=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},lE=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function uE(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 dE(e,t,n=`.`,r){if(!uE(t))return dE(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]]:uE(a)&&uE(i[t])?i[t]=dE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function fE(e){return(...t)=>t.reduce((t,n)=>dE(t,n,``,e),{})}var pE=fE(),mE=(e={},t)=>{let n=pE(t??{},x);return{organization:nE(e,n),project:rE(e,n),user:cE(e,n),oAuth:tE(n),dictionary:XT(e,n),stripe:aE(e,n),ai:qT(e,n),audit:JT(e,n),tag:oE(e,n),search:iE(e,n),editor:ZT(e,n),newsletter:eE(e,n),github:QT(e,n),gitlab:$T(e,n),bitbucket:YT(e,n),showcaseProject:lE(e,n),translate:sE(e,n)}},hE=e=>{let t=(0,_.c)(8),n=nT(),r=e??n??x,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`oAuth2AccessToken`],t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=tE(r),t[1]=r,t[2]=a);let o=!!(r.editor.clientId&&r.editor.clientSecret),s;t[3]!==a.getOAuth2AccessToken||t[4]!==o?(s={queryKey:i,queryFn:a.getOAuth2AccessToken,enabled:o,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[3]=a.getOAuth2AccessToken,t[4]=o,t[5]=s):s=t[5];let{data:c}=pc(s),l=c?.data,u;return t[6]===l?u=t[7]:(u={oAuth2AccessToken:l},t[6]=l,t[7]=u),u};function gE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var _E=gE({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`}),vE=`1.6.9`;function yE(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 bE(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 xE(){return SE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var SE={stubThis:e=>e};function CE(e){let{id:t}=e;return{...e,id:bE(t),transports:e.transports}}function wE(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 TE=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 EE({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 TE({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 TE({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 TE({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 TE({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 TE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new TE({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 TE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new TE({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(!wE(t))return new TE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new TE({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 TE({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 TE({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 DE=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}}},OE=[`cross-platform`,`platform`];function kE(e){if(e&&!(OE.indexOf(e)<0))return e}async function AE(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(!xE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:bE(t.challenge),user:{...t.user,id:bE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(CE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=DE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw EE({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){jE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=yE(e))}catch(e){jE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=yE(c.getAuthenticatorData())}catch(e){jE(`getAuthenticatorData()`,e)}return{id:o,rawId:yE(s),response:{attestationObject:yE(c.attestationObject),clientDataJSON:yE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:kE(a.authenticatorAttachment)}}function jE(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 ME(){if(!xE())return NE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?NE.stubThis(new Promise(e=>e(!1))):NE.stubThis(e.isConditionalMediationAvailable())}var NE={stubThis:e=>e};function PE({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 TE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new TE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!wE(t))return new TE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new TE({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 TE({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 FE(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(!xE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(CE));let a={...t,challenge:bE(t.challenge),allowCredentials:i},o={};if(n){if(!await ME())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=DE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw PE({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=yE(u.userHandle)),{id:c,rawId:yE(l),response:{authenticatorData:yE(u.authenticatorData),clientDataJSON:yE(u.clientDataJSON),signature:yE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:kE(s.authenticatorAttachment)}}var IE=`1.6.9`,LE=Symbol.for(`better-auth:broadcast-channel`),RE=()=>Math.floor(Date.now()/1e3),zE=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:RE()}))}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 BE(e=`better-auth.message`){return globalThis[LE]||(globalThis[LE]=new zE(e)),globalThis[LE]}var VE=Symbol.for(`better-auth:focus-manager`),HE=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 UE(){return globalThis[VE]||(globalThis[VE]=new HE),globalThis[VE]}var WE=Symbol.for(`better-auth:online-manager`),GE=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 KE(){return globalThis[WE]||(globalThis[WE]=new GE),globalThis[WE]}var qE={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*:/},JE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,YE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},XE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function ZE(e){return e instanceof Date&&!isNaN(e.getTime())}function QE(e){let t=XE.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 ZE(f)?f:null}function $E(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 YE)return YE[s];if(!JE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(qE).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=QE(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function eD(e,t={strict:!0}){return $E(e,t)}var tD=[],nD=0,rD=4,iD=0,aD=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=nD+rD;t<tD.length;)tD[t]===e?tD.splice(t,rD):t+=rD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){iD++;let i=!tD.length;for(let i of t)tD.push(i,n.value,e,r);if(i){for(nD=0;nD<tD.length;nD+=rD)tD[nD](tD[nD+1],tD[nD+2],tD[nD+3]);tD.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},oD=5,sD=6,cD=10,lD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+cD]||(e.events[n+cD]=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+cD](),delete e.events[n+cD])}),uD=1e3,dD=(e,t)=>lD(e,n=>{let r=t(n);r&&e.events[sD].push(r)},oD,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[sD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[sD])t();e.events[sD]=[]}},uD)},()=>{e.listen=n,e.off=r}}),fD=()=>typeof window>`u`,pD=(e,t,n,r)=>{let i=aD({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()=>{fD()||(o?await a():dD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},mD=()=>Math.floor(Date.now()/1e3);function hD(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var gD=5;function _D(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||KE().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=mD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=mD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=hD(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=hD(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=mD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(mD()-c.lastSessionRequest<gD)return;c.lastSessionRequest=mD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=mD(),n.set(!n.get()))},d=e=>{BE().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=BE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=UE().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=KE().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),BE().setup(),UE().setup(),KE().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 vD=Object.create(null),yD=e=>({}),bD=new Proxy(vD,{get(e,t){return yD()[t]??vD[t]},has(e,t){return t in yD()||t in vD},set(e,t,n){let r=yD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=yD(!0);return delete n[t],!0},ownKeys(){let e=yD(!0);return Object.keys(e)}});function xD(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 xD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return xD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return xD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return xD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return xD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return xD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return xD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function SD(){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 CD(e){let t=e.split(`
|
|
59
59
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
60
|
-
at `))}function _D(e,t){class n extends e{#e;constructor(...e){if(hD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=gD(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 vD={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};_D(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:vD[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 yD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function bD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new yD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function xD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new yD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof yD?t:new yD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function SD(e,t=`/api/auth`){if(xD(e),bD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function CD(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 wD(e,t,n,r,i){if(e)return SD(e,t);if(r!==!1){let e=pD.BETTER_AUTH_URL||pD.NEXT_PUBLIC_BETTER_AUTH_URL||pD.PUBLIC_BETTER_AUTH_URL||pD.NUXT_PUBLIC_BETTER_AUTH_URL||pD.NUXT_PUBLIC_AUTH_URL||(pD.BASE_URL===`/`?void 0:pD.BASE_URL);if(e)return SD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&CD(o,`proto`)&&CD(a,`host`))try{return SD(`${o}://${a}`,t)}catch{}if(n){let e=TD(n.url);if(!e)throw new yD(`Could not get origin from request. Please provide a valid base URL.`);return SD(e,t)}if(typeof window<`u`&&window.location)return SD(window.location.origin,t)}function TD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var ED={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 DD(e,t){let n=QE(!1),r=oD(n,`/get-session`,e,{method:`GET`}),i=()=>{};return iD(r,()=>{let a=uD({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 OD=Object.defineProperty,kD=Object.defineProperties,AD=Object.getOwnPropertyDescriptors,jD=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,ND=Object.prototype.propertyIsEnumerable,PD=(e,t,n)=>t in e?OD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FD=(e,t)=>{for(var n in t||={})MD.call(t,n)&&PD(e,n,t[n]);if(jD)for(var n of jD(t))ND.call(t,n)&&PD(e,n,t[n]);return e},ID=(e,t)=>kD(e,AD(t)),LD=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)}},RD=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}},zD=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}},BD=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 VD(e){if(typeof e==`number`)return new zD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new zD(e);case`exponential`:return new BD(e);default:throw Error(`Invalid retry strategy`)}}var HD=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},UD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function WD(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 UD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function GD(e){try{return JSON.parse(e),!0}catch{return!1}}function KD(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 qD(e){try{return JSON.parse(e)}catch{return e}}function JD(e){return typeof e==`function`}function YD(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&JD(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&JD(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function XD(e){let t=new Headers(e?.headers),n=await HD(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=ZD(e?.body);n&&t.set(`content-type`,n)}return t}function ZD(e){return KD(e)?`application/json`:null}function QD(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(KD(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`&&KD(e.body)?new URLSearchParams(e.body).toString():e.body}function $D(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return rO.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function eO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var tO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function nO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new tO(n.issues);return n.value}var rO=[`get`,`post`,`put`,`patch`,`delete`],iO=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=ID(FD({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=ID(FD({},e),{body:i.input?await nO(i.input,n?.body):n?.body,params:i.params?await nO(i.params,n?.params):n?.params,query:i.query?await nO(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),aO=e=>{async function t(t,n){let r=ID(FD(FD({},e),n),{plugins:[...e?.plugins||[],iO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await sO(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 sO(t,r)}return t};function oO(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];rO.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 sO=async(e,t)=>{let{hooks:n,url:r,options:i}=await RD(e,t),a=YD(i),o=new AbortController,s=i.signal??o.signal,c=oO(r,i),l=QD(i),u=await XD(i),d=$D(r,i),f=ID(FD({},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}=eO(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(ID(FD({},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=WD(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??qD)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await nO(f.output,r.data));for(let e of n.onSuccess)e&&await e(ID(FD({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??qD,_=await m.text(),v=GD(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:ID(FD({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(ID(FD({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=VD(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 sO(e,ID(FD({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new LD(m.status,m.statusText,v?y:_);return{data:null,error:ID(FD({},y),{status:m.status,statusText:m.statusText})}},cO=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{}}},lO=(e,t)=>{let n=`credentials`in Request.prototype,r=wD(e?.baseURL,e?.basePath,void 0,t)??cO(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=aO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?qE(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[ED],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=DD(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=oE(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function uO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function dO(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 fO(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`||uO(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=dO(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 pO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function mO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=lO(e),s={};for(let[e,t]of Object.entries(r))s[`use${pO(e)}`]=t;return fO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var hO=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await OE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:uE.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 CE({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 vE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:uE.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:uE.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:uE.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),gO=()=>{let e=QE();return{id:`passkey`,version:dE,$InferServerPlugin:{},getActions:(t,n)=>hO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:oD(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:uE}},_O=`1.6.9`,vO=e=>({id:`sso-client`,version:_O,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),yO=()=>({id:`magic-link`,version:kE,$InferServerPlugin:{}}),bO=lE({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`}),xO=e=>({id:`two-factor`,version:kE,$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:bO}),SO=e=>mO({baseURL:e,withCredentials:!0,plugins:[xO({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}}),gO(),yO(),vO()]}),CO=e=>{let t=e?.editor?.backendURL??x?.editor?.backendURL;t||(t=Yn,console.dir({intlayerConfig:e,configuration:x},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=SO(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})}},wO=(e,t)=>{let n=(0,_.c)(14),r=nT(),i=t??r??x,a=Qs(),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 CO(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:6e4,gcTime:3e5,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=pc(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 v=g,y;return n[10]!==v||n[11]!==p||n[12]!==h?(y={session:p,fetchSession:v,revalidateSession:v,setSession:h},n[10]=v,n[11]=p,n[12]=h,n[13]=y):y=n[13],y},TO=e=>{let t=(0,_.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}=wO(r,i),{oAuth2AccessToken:l}=cE(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},EO=e=>{let t=(0,_.c)(5),n=nT(),{oAuth2AccessToken:r}=TO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=sE({...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},DO=e=>{let t=(0,_.c)(2),n=nT(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=CO(r),t[0]=r,t[1]=i),i},OO=e=>{let t=(0,_.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=nT(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=TO(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},kO=e=>{let t=(0,_.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}=OO(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],pc(l)},AO=()=>{let e=(0,_.c)(6),t=DO(),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),mc(a)},jO=(e,t)=>{let n=(0,_.c)(9),r=EO(),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],kO(o)},MO=()=>{let e=(0,_.c)(6),t=EO(),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),mc(a)},NO=()=>{let e=(0,_.c)(6),t=EO(),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),mc(a)},PO=(e,t)=>{let n=(0,_.c)(9),r=EO(),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],kO(o)},FO=()=>{let e=(0,_.c)(3),t=EO(),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),mc(r)},IO=()=>{let e=(0,_.c)(3),t=EO(),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),mc(r)},LO=()=>{let e=(0,_.c)(3),t=EO(),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),pc(r)},RO=()=>{let e=(0,_.c)(3),t=EO(),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),mc(r)},zO=(e,t)=>{let n=(0,_.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,h.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,h.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},BO=(0,h.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),VO=()=>(0,h.useContext)(BO),HO=e=>{let t=(0,_.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=wr(),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]=zO(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,w.jsx)(BO,{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},UO=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,h.useState)(n),[u,d]=(0,h.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(WO)},t[0]=n,t[1]=p);let m=p,g;t[2]!==c||t[3]!==r?(g=()=>{r(c)},t[2]=c,t[3]=r,t[4]=g):g=t[4];let v=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{l(e.currentTarget.value)},t[5]=y):y=t[5];let b=y,x=e=>{e.key===`Enter`&&!i&&T?(e.preventDefault(),v()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(GO)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,h.useEffect)(S,C);let T=a?.(c)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,w.jsx)(hT,{onChange:b,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!T,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,w.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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{Icon:Zd,label:`Save changes${T?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!T,onClick:v,"aria-describedby":T?void 0:`validation-error`}),(0,w.jsx)(RC,{Icon:Cf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function WO(e){return e+1}function GO(e){return e+1}var KO=()=>{let e=(0,_.c)(9),{session:t,revalidateSession:n,setSession:r}=TO(),{mutate:i}=AO(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},qO=``,JO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(qO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===qO?``:t.split(qO).join(``)}).join(`
|
|
61
|
-
`)},
|
|
62
|
-
`);return t.length===0?[``]:t},
|
|
63
|
-
`)+1,
|
|
64
|
-
`,t);return n===-1?e.length:n},
|
|
60
|
+
at `))}function wD(e,t){class n extends e{#e;constructor(...e){if(SD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=CD(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 TD={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};wD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:TD[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 ED=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function DD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new ED(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function OD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new ED(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof ED?t:new ED(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function kD(e,t=`/api/auth`){if(OD(e),DD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function AD(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 jD(e,t,n,r,i){if(e)return kD(e,t);if(r!==!1){let e=bD.BETTER_AUTH_URL||bD.NEXT_PUBLIC_BETTER_AUTH_URL||bD.PUBLIC_BETTER_AUTH_URL||bD.NUXT_PUBLIC_BETTER_AUTH_URL||bD.NUXT_PUBLIC_AUTH_URL||(bD.BASE_URL===`/`?void 0:bD.BASE_URL);if(e)return kD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&AD(o,`proto`)&&AD(a,`host`))try{return kD(`${o}://${a}`,t)}catch{}if(n){let e=MD(n.url);if(!e)throw new ED(`Could not get origin from request. Please provide a valid base URL.`);return kD(e,t)}if(typeof window<`u`&&window.location)return kD(window.location.origin,t)}function MD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var ND={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 PD(e,t){let n=aD(!1),r=pD(n,`/get-session`,e,{method:`GET`}),i=()=>{};return dD(r,()=>{let a=_D({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 FD=Object.defineProperty,ID=Object.defineProperties,LD=Object.getOwnPropertyDescriptors,RD=Object.getOwnPropertySymbols,zD=Object.prototype.hasOwnProperty,BD=Object.prototype.propertyIsEnumerable,VD=(e,t,n)=>t in e?FD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HD=(e,t)=>{for(var n in t||={})zD.call(t,n)&&VD(e,n,t[n]);if(RD)for(var n of RD(t))BD.call(t,n)&&VD(e,n,t[n]);return e},UD=(e,t)=>ID(e,LD(t)),WD=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)}},GD=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}},KD=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}},qD=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 JD(e){if(typeof e==`number`)return new KD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new KD(e);case`exponential`:return new qD(e);default:throw Error(`Invalid retry strategy`)}}var YD=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},XD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ZD(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 XD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function QD(e){try{return JSON.parse(e),!0}catch{return!1}}function $D(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 eO(e){try{return JSON.parse(e)}catch{return e}}function tO(e){return typeof e==`function`}function nO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&tO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&tO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function rO(e){let t=new Headers(e?.headers),n=await YD(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=iO(e?.body);n&&t.set(`content-type`,n)}return t}function iO(e){return $D(e)?`application/json`:null}function aO(e){if(!e?.body)return null;let t=new Headers(e?.headers);if($D(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`&&$D(e.body)?new URLSearchParams(e.body).toString():e.body}function oO(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return uO.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function sO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var cO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function lO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new cO(n.issues);return n.value}var uO=[`get`,`post`,`put`,`patch`,`delete`],dO=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=UD(HD({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=UD(HD({},e),{body:i.input?await lO(i.input,n?.body):n?.body,params:i.params?await lO(i.params,n?.params):n?.params,query:i.query?await lO(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),fO=e=>{async function t(t,n){let r=UD(HD(HD({},e),n),{plugins:[...e?.plugins||[],dO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await mO(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 mO(t,r)}return t};function pO(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];uO.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 mO=async(e,t)=>{let{hooks:n,url:r,options:i}=await GD(e,t),a=nO(i),o=new AbortController,s=i.signal??o.signal,c=pO(r,i),l=aO(i),u=await rO(i),d=oO(r,i),f=UD(HD({},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}=sO(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(UD(HD({},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=ZD(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??eO)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await lO(f.output,r.data));for(let e of n.onSuccess)e&&await e(UD(HD({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??eO,_=await m.text(),v=QD(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:UD(HD({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(UD(HD({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=JD(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 mO(e,UD(HD({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new WD(m.status,m.statusText,v?y:_);return{data:null,error:UD(HD({},y),{status:m.status,statusText:m.statusText})}},hO=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{}}},gO=(e,t)=>{let n=`credentials`in Request.prototype,r=jD(e?.baseURL,e?.basePath,void 0,t)??hO(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=fO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?eD(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[ND],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=PD(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=pE(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function _O(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function vO(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 yO(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`||_O(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=vO(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 bO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=gO(e),s={};for(let[e,t]of Object.entries(r))s[`use${bO(e)}`]=t;return yO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var SO=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await FE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:_E.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 AE({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 TE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:_E.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:_E.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:_E.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),CO=()=>{let e=aD();return{id:`passkey`,version:vE,$InferServerPlugin:{},getActions:(t,n)=>SO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:pD(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:_E}},wO=`1.6.9`,TO=e=>({id:`sso-client`,version:wO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),EO=()=>({id:`magic-link`,version:IE,$InferServerPlugin:{}}),DO=gE({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`}),OO=e=>({id:`two-factor`,version:IE,$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:DO}),kO=e=>xO({baseURL:e,withCredentials:!0,plugins:[OO({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}}),CO(),EO(),TO()]}),AO=e=>{let t=e?.editor?.backendURL??x?.editor?.backendURL;t||(t=Yn,console.dir({intlayerConfig:e,configuration:x},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=kO(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})}},jO=(e,t)=>{let n=(0,_.c)(14),r=nT(),i=t??r??x,a=Qs(),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 AO(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:6e4,gcTime:3e5,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=pc(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 v=g,y;return n[10]!==v||n[11]!==p||n[12]!==h?(y={session:p,fetchSession:v,revalidateSession:v,setSession:h},n[10]=v,n[11]=p,n[12]=h,n[13]=y):y=n[13],y},MO=e=>{let t=(0,_.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}=jO(r,i),{oAuth2AccessToken:l}=hE(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},NO=e=>{let t=(0,_.c)(5),n=nT(),{oAuth2AccessToken:r}=MO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=mE({...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},PO=e=>{let t=(0,_.c)(2),n=nT(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=AO(r),t[0]=r,t[1]=i),i},FO=e=>{let t=(0,_.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=nT(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=MO(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},IO=e=>{let t=(0,_.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}=FO(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],pc(l)},LO=()=>{let e=(0,_.c)(6),t=PO(),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),mc(a)},RO=(e,t)=>{let n=(0,_.c)(9),r=NO(),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],IO(o)},zO=()=>{let e=(0,_.c)(6),t=NO(),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),mc(a)},BO=()=>{let e=(0,_.c)(6),t=NO(),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),mc(a)},VO=(e,t)=>{let n=(0,_.c)(9),r=NO(),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],IO(o)},HO=()=>{let e=(0,_.c)(3),t=NO(),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),mc(r)},UO=()=>{let e=(0,_.c)(3),t=NO(),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),mc(r)},WO=()=>{let e=(0,_.c)(3),t=NO(),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),pc(r)},GO=()=>{let e=(0,_.c)(3),t=NO(),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),mc(r)},KO=``,qO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(KO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===KO?``:t.split(KO).join(``)}).join(`
|
|
61
|
+
`)},JO=e=>{let t=e.split(`
|
|
62
|
+
`);return t.length===0?[``]:t},YO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),XO=(e,t)=>{if(t<=0)return 0;if(YO){let n=[...YO.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},ZO=(e,t)=>{if(t>=e.length)return e.length;if(YO){let n=[...YO.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},QO=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},$O=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},ek=(e,t)=>e.slice(0,t).lastIndexOf(`
|
|
63
|
+
`)+1,tk=(e,t)=>{let n=e.indexOf(`
|
|
64
|
+
`,t);return n===-1?e.length:n},nk=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,h.useState)(()=>JO(i)),s=(0,h.useRef)(null),c=(0,h.useRef)(null),l=e!==void 0,u=(0,h.useRef)(a);u.current=a,(0,h.useEffect)(()=>{l&&e!==void 0&&o(JO(e))},[e,l]);let d=()=>u.current.join(`
|
|
65
65
|
`),f=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`);for(let e=0;e<n.length;e++)if(n[e].contains(t.startContainer))return{line:e,offset:t.startOffset};return null},p=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=u.current,i=(e,t)=>{for(let i=0;i<n.length;i++)if(n[i].contains(e)){let e=0;for(let t=0;t<i;t++)e+=r[t].length+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
|
|
66
|
-
`).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,h.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let g=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},_=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},v=()=>{let e=f();return e?g(e):0},y=(e,t)=>{let r=
|
|
67
|
-
`);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=
|
|
66
|
+
`).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,h.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let g=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},_=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},v=()=>{let e=f();return e?g(e):0},y=(e,t)=>{let r=JO(e);c.current=_(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=qO(s.current),i=JO(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
|
|
67
|
+
`);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=XO(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=ZO(r,t.start);y(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
68
68
|
`),i=t.data??t.dataTransfer?.getData(`text/plain`)??``;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length);return}if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
69
69
|
`),i=t.data;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length)}}},handleKeyDown:e=>{if(r){e.preventDefault();return}if(e.nativeEvent.isComposing)return;if((e.metaKey||e.ctrlKey)&&e.key===`z`){e.preventDefault();return}let t=p();if(!t)return;let n=u.current.join(`
|
|
70
70
|
`);if(e.key===`Enter`){e.preventDefault(),y(n.slice(0,t.start)+`
|
|
71
|
-
`+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?
|
|
71
|
+
`+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?ek(n,t.start):e.altKey?QO(n,t.start):XO(n,t.start),y(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?tk(n,t.start):e.altKey?$O(n,t.start):ZO(n,t.start),y(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
|
|
72
72
|
`),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),y(n.slice(0,t.start)+n.slice(t.end),t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=p();if(!n)return;let i=u.current.join(`
|
|
73
|
-
`);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:v,caretFromFlatOffset:_}},
|
|
74
|
-
`);return(0,w.jsx)(sk,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},lk=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=KO(),[l,u]=(0,h.useState)(n),[d,f]=(0,h.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(uk)},t[0]=n,t[1]=m);let g=m,v;t[2]!==l||t[3]!==r?(v=()=>{r(l)},t[2]=l,t[3]=r,t[4]=v):v=t[4];let y=v,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>u(e.currentTarget.value??``),t[5]=b):b=t[5];let x=b,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),g())},C,T;t[6]===n?(C=t[7],T=t[8]):(C=()=>{u(n),f(dk)},T=[n],t[6]=n,t[7]=C,t[8]=T),(0,h.useEffect)(C,T);let E=a?.(l)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,w.jsx)(ck,{onChange:x,onKeyDown:S,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!E,...s},d),(p||o)&&(0,w.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{Icon:Zd,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:y,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,w.jsx)(RC,{Icon:Cf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:g,disabled:i})]}),o]})]},n)};function uk(e){return e+1}function dk(e){return e+1}var fk=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},pk=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,w.jsxs)(`label`,{className:G(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,w.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),mk=Rd(`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`,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`,"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`,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`}}),hk=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},gk=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(gk):(0,h.isValidElement)(e)?gk(e.props.children):!1,_k=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??hk(e),g=f??p?.startsWith(`#`)??!1,_=gk(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,w.jsxs)(`a`,{href:l&&p&&!h&&!g?tr(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(mk({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,w.jsx)(`span`,{children:i}):i,h&&_&&(0,w.jsx)(sf,{className:`ml-2 inline-block size-4`}),g&&(0,w.jsx)(pf,{className:`ml-2 inline-block size-4`})]})},vk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,yk=`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`,bk=({className:e,...t})=>(0,w.jsx)(`h1`,{className:G(`font-bold text-2xl`,e),...t}),xk=({className:e,...t})=>(0,w.jsx)(`h2`,{className:G(`mb-2 font-bold text-2xl`,vk,e),...t}),Sk=({className:e,...t})=>(0,w.jsx)(`h3`,{className:G(`mb-2 font-bold text-xl`,vk,e),...t}),Ck=({className:e,...t})=>(0,w.jsx)(`h4`,{className:G(`font-bold text-lg`,vk,e),...t}),wk=({className:e,...t})=>(0,w.jsx)(`h5`,{className:G(`font-bold text-base`,vk,e),...t}),Tk=({className:e,...t})=>(0,w.jsx)(`h6`,{className:G(`ml-3 font-bold text-base`,vk,e),...t}),Ek=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Dk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Ok=(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},kk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Ek(t):void 0;return(0,w.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Ok(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Dk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&yk,n),...i,children:t})},Ak=({isClickable:e,...t})=>(0,w.jsx)(bk,{...t}),jk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:xk,isClickable:e,...t}),Mk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Sk,isClickable:e,...t}),Nk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Ck,isClickable:e,...t}),Pk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:wk,isClickable:e,...t}),Fk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Tk,isClickable:e,...t}),Ik=(0,h.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Lk=()=>(0,h.useContext)(Ik),Rk=e=>{let t=(0,_.c)(8),{children:n}=e,[r,i]=zO(`packageManager`,`npm`),[a,o]=zO(`codeFormat`,`typescript`),[s,c]=zO(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,w.jsx)(Ik,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},zk={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},Bk=700,Vk=({isRollable:e=!0,minHeight:t=Bk,children:n,className:r})=>{let[i,a]=(0,h.useState)(0),[o,s]=(0,h.useState)(!0),c=(0,h.useRef)(null),{expandCollapseContent:l}=Cr(zk),u=i>t;return(0,h.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,w.jsxs)(zC,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,w.jsx)(`div`,{className:G(`grid w-full`,r),ref:c,children:n}),(0,w.jsx)(`button`,{className:G(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:l(o)})]}):(0,w.jsx)(`div`,{className:G(`grid w-full`,r),ref:c,children:n}):n},Hk=({children:e})=>(0,w.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,w.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
75
|
-
`).map((e,t)=>(0,w.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),Uk=(0,h.lazy)(()=>Pn(()=>import(`./CodeBlockShiki-CnCV6aC8.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1]))),Wk=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,w.jsx)(`div`,{className:G(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(Hk,{children:r}),children:(0,w.jsx)(Uk,{lang:i,isDarkMode:a,children:r})})}),Gk=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},Kk=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,h.useState)(null),o=(0,h.useRef)(null);(0,h.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=Gk(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await Pn(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(e,n),c=Gk(a(t,n))}let{codeToHtml:l}=await Pn(async()=>{let{codeToHtml:e}=await import(`./bundle-web-bPoImZEz.js`);return{codeToHtml:e}},__vite__mapDeps([2,1]));if(i)return;let u=await l(s,{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`code`,{children:e})})},qk=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Jk=e=>{let t=(0,_.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=Lk(),s=r.packageManager===void 0,c=i===r.packageManager,l=qk(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=qk(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(w.Fragment,{}),t[0]=h):h=t[0],h},Yk={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function Xk(e,[t,n]){return Math.min(n,Math.max(t,e))}var Zk=h.createContext(void 0);function Qk(e){let t=h.useContext(Zk);return e||t||`ltr`}var $k=0;function eA(){h.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??tA()),document.body.insertAdjacentElement(`beforeend`,e[1]??tA()),$k++,()=>{$k===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),$k--}},[])}function tA(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var nA=`focusScope.autoFocusOnMount`,rA=`focusScope.autoFocusOnUnmount`,iA={bubbles:!1,cancelable:!0},aA=`FocusScope`,oA=h.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=h.useState(null),l=cu(i),u=cu(a),d=h.useRef(null),f=Jl(t,e=>c(e)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:pA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||pA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&pA(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),h.useEffect(()=>{if(s){mA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(nA,iA);s.addEventListener(nA,l),s.dispatchEvent(t),t.defaultPrevented||(sA(_A(lA(s)),{select:!0}),document.activeElement===e&&pA(s))}return()=>{s.removeEventListener(nA,l),setTimeout(()=>{let t=new CustomEvent(rA,iA);s.addEventListener(rA,u),s.dispatchEvent(t),t.defaultPrevented||pA(e??document.body,{select:!0}),s.removeEventListener(rA,u),mA.remove(p)},0)}}},[s,l,u,p]);let m=h.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=cA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&pA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&pA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,w.jsx)(ou.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});oA.displayName=aA;function sA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(pA(r,{select:t}),document.activeElement!==n)return}function cA(e){let t=lA(e);return[uA(t,e),uA(t.reverse(),e)]}function lA(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uA(e,t){for(let n of e)if(!dA(n,{upTo:t}))return n}function dA(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function fA(e){return e instanceof HTMLInputElement&&`select`in e}function pA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fA(e)&&t&&e.select()}}var mA=hA();function hA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gA(e,t),e.unshift(t)},remove(t){e=gA(e,t),e[0]?.resume()}}}function gA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _A(e){return e.filter(e=>e.tagName!==`A`)}var vA=h.useId||(()=>void 0),yA=0;function bA(e){let[t,n]=h.useState(vA());return Tu(()=>{e||n(e=>e??String(yA++))},[e]),e||(t?`radix-${t}`:``)}var xA=[`top`,`right`,`bottom`,`left`],SA=Math.min,CA=Math.max,wA=Math.round,TA=Math.floor,EA=e=>({x:e,y:e}),DA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function OA(e,t,n){return CA(e,SA(t,n))}function kA(e,t){return typeof e==`function`?e(t):e}function AA(e){return e.split(`-`)[0]}function jA(e){return e.split(`-`)[1]}function MA(e){return e===`x`?`y`:`x`}function NA(e){return e===`y`?`height`:`width`}function PA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function FA(e){return MA(PA(e))}function IA(e,t,n){n===void 0&&(n=!1);let r=jA(e),i=FA(e),a=NA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=GA(o)),[o,GA(o)]}function LA(e){let t=GA(e);return[RA(e),t,RA(t)]}function RA(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zA=[`left`,`right`],BA=[`right`,`left`],VA=[`top`,`bottom`],HA=[`bottom`,`top`];function UA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?BA:zA:t?zA:BA;case`left`:case`right`:return t?VA:HA;default:return[]}}function WA(e,t,n,r){let i=jA(e),a=UA(AA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(RA)))),a}function GA(e){let t=AA(e);return DA[t]+e.slice(t.length)}function KA(e){return{top:0,right:0,bottom:0,left:0,...e}}function qA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:KA(e)}function JA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YA(e,t,n){let{reference:r,floating:i}=e,a=PA(t),o=FA(t),s=NA(o),c=AA(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function XA(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kA(t,e),p=qA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=JA(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=JA(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ZA=50,QA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:XA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=YA(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ZA&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=YA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},$A=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kA(e,t)||{};if(l==null)return{};let d=qA(u),f={x:n,y:r},p=FA(i),m=NA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=SA(d[_],T),D=SA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=OA(O,A,k),M=!c.arrow&&jA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),ej=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=AA(r),_=PA(o),v=AA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[GA(o)]:LA(o)),x=p!==`none`;!d&&x&&b.push(...WA(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=IA(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==PA(t))||T.every(e=>PA(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=PA(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function tj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nj(e){return xA.some(t=>e[t]>=0)}var rj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=kA(e,t);switch(i){case`referenceHidden`:{let e=tj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nj(e)}}}case`escaped`:{let e=tj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nj(e)}}}default:return{}}}}},ij=new Set([`left`,`top`]);async function aj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AA(n),s=jA(n),c=PA(n)===`y`,l=ij.has(o)?-1:1,u=a&&c?-1:1,d=kA(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var oj=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await aj(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},sj=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=PA(AA(i)),p=MA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=OA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=OA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},cj=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kA(e,t),u={x:n,y:r},d=PA(i),f=MA(d),p=u[f],m=u[d],h=kA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ij.has(AA(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},lj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=kA(e,t),u=await o.detectOverflow(t,l),d=AA(i),f=jA(i),p=PA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=SA(h-u[g],v),x=SA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=CA(u.left,0),t=CA(u.right,0),n=CA(u.top,0),r=CA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:CA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:CA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function uj(){return typeof window<`u`}function dj(e){return mj(e)?(e.nodeName||``).toLowerCase():`#document`}function fj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pj(e){return((mj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mj(e){return uj()?e instanceof Node||e instanceof fj(e).Node:!1}function hj(e){return uj()?e instanceof Element||e instanceof fj(e).Element:!1}function gj(e){return uj()?e instanceof HTMLElement||e instanceof fj(e).HTMLElement:!1}function _j(e){return!uj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fj(e).ShadowRoot}function vj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function yj(e){return/^(table|td|th)$/.test(dj(e))}function bj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xj=/transform|translate|scale|rotate|perspective|filter/,Sj=/paint|layout|strict|content/,Cj=e=>!!e&&e!==`none`,wj;function Tj(e){let t=hj(e)?kj(e):e;return Cj(t.transform)||Cj(t.translate)||Cj(t.scale)||Cj(t.rotate)||Cj(t.perspective)||!Dj()&&(Cj(t.backdropFilter)||Cj(t.filter))||xj.test(t.willChange||``)||Sj.test(t.contain||``)}function Ej(e){let t=jj(e);for(;gj(t)&&!Oj(t);){if(Tj(t))return t;if(bj(t))return null;t=jj(t)}return null}function Dj(){return wj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),wj}function Oj(e){return/^(html|body|#document)$/.test(dj(e))}function kj(e){return fj(e).getComputedStyle(e)}function Aj(e){return hj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jj(e){if(dj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_j(e)&&e.host||pj(e);return _j(t)?t.host:t}function Mj(e){let t=jj(e);return Oj(t)?e.ownerDocument?e.ownerDocument.body:e.body:gj(t)&&vj(t)?t:Mj(t)}function Nj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Mj(e),i=r===e.ownerDocument?.body,a=fj(r);if(i){let e=Pj(a);return t.concat(a,a.visualViewport||[],vj(r)?r:[],e&&n?Nj(e):[])}else return t.concat(r,Nj(r,[],n))}function Pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fj(e){let t=kj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wA(n)!==a||wA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ij(e){return hj(e)?e:e.contextElement}function Lj(e){let t=Ij(e);if(!gj(t))return EA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Fj(t),o=(a?wA(n.width):n.width)/r,s=(a?wA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rj=EA(0);function zj(e){let t=fj(e);return!Dj()||!t.visualViewport?Rj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fj(e)?!1:t}function Vj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ij(e),o=EA(1);t&&(r?hj(r)&&(o=Lj(r)):o=Lj(e));let s=Bj(a,n,r)?zj(a):EA(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=fj(a),t=r&&hj(r)?fj(r):r,n=e,i=Pj(n);for(;i&&r&&t!==n;){let e=Lj(i),t=i.getBoundingClientRect(),r=kj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fj(i),i=Pj(n)}}return JA({width:u,height:d,x:c,y:l})}function Hj(e,t){let n=Aj(e).scrollLeft;return t?t.left+n:Vj(pj(e)).left+n}function Uj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hj(e,n),y:n.top+t.scrollTop}}function Wj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pj(r),s=t?bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=EA(1),u=EA(0),d=gj(r);if((d||!d&&!a)&&((dj(r)!==`body`||vj(o))&&(c=Aj(r)),d)){let e=Vj(r);l=Lj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Uj(o,c):EA(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gj(e){return Array.from(e.getClientRects())}function Kj(e){let t=pj(e),n=Aj(e),r=e.ownerDocument.body,i=CA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=CA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Hj(e),s=-n.scrollTop;return kj(r).direction===`rtl`&&(o+=CA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qj=25;function Jj(e,t){let n=fj(e),r=pj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Dj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Hj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qj&&(a-=o)}else l<=qj&&(a+=l);return{width:a,height:o,x:s,y:c}}function Yj(e,t){let n=Vj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=gj(e)?Lj(e):EA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xj(e,t,n){let r;if(t===`viewport`)r=Jj(e,n);else if(t===`document`)r=Kj(pj(e));else if(hj(t))r=Yj(t,n);else{let n=zj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return JA(r)}function Zj(e,t){let n=jj(e);return n===t||!hj(n)||Oj(n)?!1:kj(n).position===`fixed`||Zj(n,t)}function Qj(e,t){let n=t.get(e);if(n)return n;let r=Nj(e,[],!1).filter(e=>hj(e)&&dj(e)!==`body`),i=null,a=kj(e).position===`fixed`,o=a?jj(e):e;for(;hj(o)&&!Oj(o);){let t=kj(o),n=Tj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||vj(o)&&!n&&Zj(e,o))?r=r.filter(e=>e!==o):i=t,o=jj(o)}return t.set(e,r),r}function $j(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bj(t)?[]:Qj(t,this._c):[].concat(n),r],o=Xj(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Xj(t,a[e],i);s=CA(n.top,s),c=SA(n.right,c),l=SA(n.bottom,l),u=CA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function eM(e){let{width:t,height:n}=Fj(e);return{width:t,height:n}}function tM(e,t,n){let r=gj(t),i=pj(t),a=n===`fixed`,o=Vj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=EA(0);function l(){c.x=Hj(i)}if(r||!r&&!a)if((dj(t)!==`body`||vj(i))&&(s=Aj(t)),r){let e=Vj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Uj(i,s):EA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function nM(e){return kj(e).position===`static`}function rM(e,t){if(!gj(e)||kj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pj(e)===n&&(n=n.ownerDocument.body),n}function iM(e,t){let n=fj(e);if(bj(e))return n;if(!gj(e)){let t=jj(e);for(;t&&!Oj(t);){if(hj(t)&&!nM(t))return t;t=jj(t)}return n}let r=rM(e,t);for(;r&&yj(r)&&nM(r);)r=rM(r,t);return r&&Oj(r)&&nM(r)&&!Tj(r)?n:r||Ej(e)||n}var aM=async function(e){let t=this.getOffsetParent||iM,n=this.getDimensions,r=await n(e.floating);return{reference:tM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oM(e){return kj(e).direction===`rtl`}var sM={convertOffsetParentRelativeRectToViewportRelativeRect:Wj,getDocumentElement:pj,getClippingRect:$j,getOffsetParent:iM,getElementRects:aM,getClientRects:Gj,getDimensions:eM,getScale:Lj,isElement:hj,isRTL:oM};function cM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lM(e,t){let n=null,r,i=pj(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=TA(d),h=TA(i.clientWidth-(u+f)),g=TA(i.clientHeight-(d+p)),_=TA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:CA(0,SA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!cM(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function uM(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ij(e),u=i||a?[...l?Nj(l):[],...t?Nj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lM(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Vj(e):null;c&&g();function g(){let t=Vj(e);h&&!cM(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dM=oj,fM=sj,pM=ej,mM=lj,hM=rj,gM=$A,_M=cj,vM=(e,t,n)=>{let r=new Map,i={platform:sM,...n},a={...i.platform,_c:r};return QA(e,t,{...i,platform:a})},yM=typeof document<`u`?h.useLayoutEffect:function(){};function bM(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bM(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!bM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function xM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function SM(e,t){let n=xM(e);return Math.round(t*n)/n}function CM(e){let t=h.useRef(e);return yM(()=>{t.current=e}),t}function wM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);bM(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=CM(c),O=CM(i),k=CM(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),vM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!bM(T.current,t)&&(T.current=t,au.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);yM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);yM(()=>(j.current=!0,()=>{j.current=!1}),[]),yM(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=SM(N.floating,u.x),r=SM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...xM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var TM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:gM({element:r.current,padding:i}).fn(n):r?gM({element:r,padding:i}).fn(n):{}}}},EM=(e,t)=>{let n=dM(e);return{name:n.name,fn:n.fn,options:[e,t]}},DM=(e,t)=>{let n=fM(e);return{name:n.name,fn:n.fn,options:[e,t]}},OM=(e,t)=>({fn:_M(e).fn,options:[e,t]}),kM=(e,t)=>{let n=pM(e);return{name:n.name,fn:n.fn,options:[e,t]}},AM=(e,t)=>{let n=mM(e);return{name:n.name,fn:n.fn,options:[e,t]}},jM=(e,t)=>{let n=hM(e);return{name:n.name,fn:n.fn,options:[e,t]}},MM=(e,t)=>{let n=TM(e);return{name:n.name,fn:n.fn,options:[e,t]}},NM=`Arrow`,PM=h.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(ou.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});PM.displayName=NM;var FM=PM;function IM(e){let[t,n]=h.useState(void 0);return Tu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var LM=`Popper`,[RM,zM]=Xl(LM),[BM,VM]=RM(LM),HM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null);return(0,w.jsx)(BM,{scope:t,anchor:r,onAnchorChange:i,children:n})};HM.displayName=LM;var UM=`PopperAnchor`,WM=h.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=VM(UM,n),o=h.useRef(null),s=Jl(t,o),c=h.useRef(null);return h.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,w.jsx)(ou.div,{...i,ref:s})});WM.displayName=UM;var GM=`PopperContent`,[KM,qM]=RM(GM),JM=h.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...g}=e,_=VM(GM,n),[v,y]=h.useState(null),b=Jl(t,e=>y(e)),[x,S]=h.useState(null),C=IM(x),T=C?.width??0,E=C?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(QM),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=wM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>uM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[EM({mainAxis:i+E,alignmentAxis:o}),c&&DM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?OM():void 0,...j}),c&&kM({...j}),AM({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&MM({element:x,padding:s}),$M({arrowWidth:T,arrowHeight:E}),f&&jM({strategy:`referenceHidden`,...j})]}),[L,R]=eN(P),ee=cu(m);Tu(()=>{F&&ee?.()},[F,ee]);let te=I.arrow?.x,z=I.arrow?.y,B=I.arrow?.centerOffset!==0,[V,ne]=h.useState();return Tu(()=>{v&&ne(window.getComputedStyle(v).zIndex)},[v]),(0,w.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(KM,{scope:n,placedSide:L,onArrowChange:S,arrowX:te,arrowY:z,shouldHideArrow:B,children:(0,w.jsx)(ou.div,{"data-side":L,"data-align":R,...g,ref:b,style:{...g.style,animation:F?void 0:`none`}})})})});JM.displayName=GM;var YM=`PopperArrow`,XM={top:`bottom`,right:`left`,bottom:`top`,left:`right`},ZM=h.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=qM(YM,n),a=XM[i.placedSide];return(0,w.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,w.jsx)(FM,{...r,ref:t,style:{...r.style,display:`block`}})})});ZM.displayName=YM;function QM(e){return e!==null}var $M=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=eN(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function eN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var tN=HM,nN=WM,rN=JM,iN=ZM;function aN(e){let t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},sN=new WeakMap,cN=new WeakMap,lN={},uN=0,dN=function(e){return e&&(e.host||dN(e.parentNode))},fN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=dN(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},pN=function(e,t,n,r){var i=fN(t,Array.isArray(e)?e:[e]);lN[n]||(lN[n]=new WeakMap);var a=lN[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(sN.get(e)||0)+1,l=(a.get(e)||0)+1;sN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&cN.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),uN++,function(){o.forEach(function(e){var t=sN.get(e)-1,i=a.get(e)-1;sN.set(e,t),a.set(e,i),t||(cN.has(e)||e.removeAttribute(r),cN.delete(e)),i||e.removeAttribute(n)}),uN--,uN||(sN=new WeakMap,sN=new WeakMap,cN=new WeakMap,lN={})}},mN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||oN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),pN(r,i,n,`aria-hidden`)):function(){return null}},hN=function(){return hN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hN.apply(this,arguments)};function gN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _N(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var vN=`right-scroll-bar-position`,yN=`width-before-scroll-bar`,bN=`with-scroll-bars-hidden`,xN=`--removed-body-scroll-bar-size`;function SN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function CN(e,t){var n=(0,h.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var wN=typeof window<`u`?h.useLayoutEffect:h.useEffect,TN=new WeakMap;function EN(e,t){var n=CN(t||null,function(t){return e.forEach(function(e){return SN(e,t)})});return wN(function(){var t=TN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||SN(e,null)}),i.forEach(function(e){r.has(e)||SN(e,a)})}TN.set(n,e)},[e]),n}function DN(e){return e}function ON(e,t){t===void 0&&(t=DN);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function kN(e){e===void 0&&(e={});var t=ON(null);return t.options=hN({async:!0,ssr:!1},e),t}var AN=function(e){var t=e.sideCar,n=gN(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return h.createElement(r,hN({},n))};AN.isSideCarExport=!0;function jN(e,t){return e.useMedium(t),AN}var MN=kN(),NN=function(){},PN=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:NN,onWheelCapture:NN,onTouchMoveCapture:NN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=gN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=EN([n,t]),w=hN(hN({},x),i);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:MN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?h.cloneElement(h.Children.only(s),hN(hN({},w),{ref:C})):h.createElement(y,hN({},w,{className:c,ref:C}),s))});PN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},PN.classNames={fullWidth:yN,zeroRight:vN};var FN,IN=function(){if(FN)return FN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function LN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=IN();return t&&e.setAttribute(`nonce`,t),e}function RN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var BN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=LN())&&(RN(t,n),zN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VN=function(){var e=BN();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HN=function(){var e=VN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},UN={left:0,top:0,right:0,gap:0},WN=function(e){return parseInt(e||``,10)||0},GN=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[WN(n),WN(r),WN(i)]},KN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return UN;var t=GN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qN=HN(),JN=`data-scroll-locked`,YN=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
73
|
+
`);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:v,caretFromFlatOffset:_}},rk=({index:e,text:t,isLast:n,ghostText:r})=>(0,w.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,w.jsx)(`span`,{"data-editable":!0,children:t||``}),r&&(0,w.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,w.jsx)(`br`,{})]}),ik=24,ak=12,ok=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:m,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:C,handleKeyDown:T,handleCut:E,handlePaste:D,handleDrop:O,handleDragOver:k,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=nk({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,h.useRef)(null),P=e=>{N.current=e,b.current=e};(0,h.useImperativeHandle)(_,()=>({getContainer:()=>N.current,getText:x,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,y))}})),(0,h.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=ik*o+ak,n=ik*a+ak;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[y,s,o,a]);let F=y.length===1&&y[0]===``,I=u&&d!==void 0&&f!==void 0;return(0,w.jsxs)(`div`,{className:`relative w-full`,children:[F&&r&&(0,w.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,w.jsx)(`div`,{...v,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":I?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:C,onKeyDown:T,onCut:E,onPaste:D,onDrop:O,onDragOver:k,onClick:p,className:G(`resize-none whitespace-pre-wrap break-words outline-none`,mT({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,m),children:y.map((e,t)=>(0,w.jsx)(rk,{index:t,text:e,isLast:t===y.length-1,ghostText:I&&d===t?u:void 0},t))})]})},sk=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,h.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,h.useState)(``),s=(0,h.useRef)(null);(0,h.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
|
|
74
|
+
`);return(0,w.jsx)(ok,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},ck=()=>{let e=(0,_.c)(9),{session:t,revalidateSession:n,setSession:r}=MO(),{mutate:i}=LO(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},lk=e=>{let t=(0,_.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=ck(),[l,u]=(0,h.useState)(n),[d,f]=(0,h.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(uk)},t[0]=n,t[1]=m);let g=m,v;t[2]!==l||t[3]!==r?(v=()=>{r(l)},t[2]=l,t[3]=r,t[4]=v):v=t[4];let y=v,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>u(e.currentTarget.value??``),t[5]=b):b=t[5];let x=b,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),g())},C,T;t[6]===n?(C=t[7],T=t[8]):(C=()=>{u(n),f(dk)},T=[n],t[6]=n,t[7]=C,t[8]=T),(0,h.useEffect)(C,T);let E=a?.(l)??!0;return(0,w.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,w.jsx)(sk,{onChange:x,onKeyDown:S,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!E,...s},d),(p||o)&&(0,w.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{Icon:Zd,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:y,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,w.jsx)(RC,{Icon:Cf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:g,disabled:i})]}),o]})]},n)};function uk(e){return e+1}function dk(e){return e+1}var fk=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},pk=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,w.jsxs)(`label`,{className:G(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,w.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),mk=Rd(`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`,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`,"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`,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`}}),hk=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},gk=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(gk):(0,h.isValidElement)(e)?gk(e.props.children):!1,_k=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??hk(e),g=f??p?.startsWith(`#`)??!1,_=gk(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,w.jsxs)(`a`,{href:l&&p&&!h&&!g?tr(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(mk({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,w.jsx)(`span`,{children:i}):i,h&&_&&(0,w.jsx)(sf,{className:`ml-2 inline-block size-4`}),g&&(0,w.jsx)(pf,{className:`ml-2 inline-block size-4`})]})},vk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,yk=`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`,bk=({className:e,...t})=>(0,w.jsx)(`h1`,{className:G(`font-bold text-2xl`,e),...t}),xk=({className:e,...t})=>(0,w.jsx)(`h2`,{className:G(`mb-2 font-bold text-2xl`,vk,e),...t}),Sk=({className:e,...t})=>(0,w.jsx)(`h3`,{className:G(`mb-2 font-bold text-xl`,vk,e),...t}),Ck=({className:e,...t})=>(0,w.jsx)(`h4`,{className:G(`font-bold text-lg`,vk,e),...t}),wk=({className:e,...t})=>(0,w.jsx)(`h5`,{className:G(`font-bold text-base`,vk,e),...t}),Tk=({className:e,...t})=>(0,w.jsx)(`h6`,{className:G(`ml-3 font-bold text-base`,vk,e),...t}),Ek=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Dk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Ok=(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},kk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Ek(t):void 0;return(0,w.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Ok(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Dk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&yk,n),...i,children:t})},Ak=({isClickable:e,...t})=>(0,w.jsx)(bk,{...t}),jk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:xk,isClickable:e,...t}),Mk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Sk,isClickable:e,...t}),Nk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Ck,isClickable:e,...t}),Pk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:wk,isClickable:e,...t}),Fk=({isClickable:e=!1,...t})=>(0,w.jsx)(kk,{H:Tk,isClickable:e,...t}),Ik=(0,h.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Lk=()=>(0,h.useContext)(Ik),Rk=e=>{let t=(0,_.c)(8),{children:n}=e,[r,i]=LT(`packageManager`,`npm`),[a,o]=LT(`codeFormat`,`typescript`),[s,c]=LT(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,w.jsx)(Ik,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},zk={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},Bk=700,Vk=({isRollable:e=!0,minHeight:t=Bk,children:n,className:r})=>{let[i,a]=(0,h.useState)(0),[o,s]=(0,h.useState)(!0),c=(0,h.useRef)(null),{expandCollapseContent:l}=Cr(zk),u=i>t;return(0,h.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,w.jsxs)(zC,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,w.jsx)(`div`,{className:G(`grid w-full`,r),ref:c,children:n}),(0,w.jsx)(`button`,{className:G(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:l(o)})]}):(0,w.jsx)(`div`,{className:G(`grid w-full`,r),ref:c,children:n}):n},Hk=({children:e})=>(0,w.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,w.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
75
|
+
`).map((e,t)=>(0,w.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),Uk=(0,h.lazy)(()=>Pn(()=>import(`./CodeBlockShiki-k0O-JCEW.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1]))),Wk=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,w.jsx)(`div`,{className:G(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(Hk,{children:r}),children:(0,w.jsx)(Uk,{lang:i,isDarkMode:a,children:r})})}),Gk=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},Kk=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,h.useState)(null),o=(0,h.useRef)(null);(0,h.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=Gk(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await Pn(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(e,n),c=Gk(a(t,n))}let{codeToHtml:l}=await Pn(async()=>{let{codeToHtml:e}=await import(`./bundle-web-B6k7Zt6P.js`);return{codeToHtml:e}},__vite__mapDeps([2,1]));if(i)return;let u=await l(s,{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,w.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,w.jsx)(`code`,{children:e})})},qk=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Jk=e=>{let t=(0,_.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=Lk(),s=r.packageManager===void 0,c=i===r.packageManager,l=qk(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=qk(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(w.Fragment,{}),t[0]=h):h=t[0],h},Yk={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function Xk(e,[t,n]){return Math.min(n,Math.max(t,e))}var Zk=h.createContext(void 0);function Qk(e){let t=h.useContext(Zk);return e||t||`ltr`}var $k=0;function eA(){h.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??tA()),document.body.insertAdjacentElement(`beforeend`,e[1]??tA()),$k++,()=>{$k===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),$k--}},[])}function tA(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var nA=`focusScope.autoFocusOnMount`,rA=`focusScope.autoFocusOnUnmount`,iA={bubbles:!1,cancelable:!0},aA=`FocusScope`,oA=h.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=h.useState(null),l=cu(i),u=cu(a),d=h.useRef(null),f=Jl(t,e=>c(e)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:pA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||pA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&pA(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),h.useEffect(()=>{if(s){mA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(nA,iA);s.addEventListener(nA,l),s.dispatchEvent(t),t.defaultPrevented||(sA(_A(lA(s)),{select:!0}),document.activeElement===e&&pA(s))}return()=>{s.removeEventListener(nA,l),setTimeout(()=>{let t=new CustomEvent(rA,iA);s.addEventListener(rA,u),s.dispatchEvent(t),t.defaultPrevented||pA(e??document.body,{select:!0}),s.removeEventListener(rA,u),mA.remove(p)},0)}}},[s,l,u,p]);let m=h.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=cA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&pA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&pA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,w.jsx)(ou.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});oA.displayName=aA;function sA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(pA(r,{select:t}),document.activeElement!==n)return}function cA(e){let t=lA(e);return[uA(t,e),uA(t.reverse(),e)]}function lA(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uA(e,t){for(let n of e)if(!dA(n,{upTo:t}))return n}function dA(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function fA(e){return e instanceof HTMLInputElement&&`select`in e}function pA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fA(e)&&t&&e.select()}}var mA=hA();function hA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gA(e,t),e.unshift(t)},remove(t){e=gA(e,t),e[0]?.resume()}}}function gA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _A(e){return e.filter(e=>e.tagName!==`A`)}var vA=h.useId||(()=>void 0),yA=0;function bA(e){let[t,n]=h.useState(vA());return Tu(()=>{e||n(e=>e??String(yA++))},[e]),e||(t?`radix-${t}`:``)}var xA=[`top`,`right`,`bottom`,`left`],SA=Math.min,CA=Math.max,wA=Math.round,TA=Math.floor,EA=e=>({x:e,y:e}),DA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function OA(e,t,n){return CA(e,SA(t,n))}function kA(e,t){return typeof e==`function`?e(t):e}function AA(e){return e.split(`-`)[0]}function jA(e){return e.split(`-`)[1]}function MA(e){return e===`x`?`y`:`x`}function NA(e){return e===`y`?`height`:`width`}function PA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function FA(e){return MA(PA(e))}function IA(e,t,n){n===void 0&&(n=!1);let r=jA(e),i=FA(e),a=NA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=GA(o)),[o,GA(o)]}function LA(e){let t=GA(e);return[RA(e),t,RA(t)]}function RA(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zA=[`left`,`right`],BA=[`right`,`left`],VA=[`top`,`bottom`],HA=[`bottom`,`top`];function UA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?BA:zA:t?zA:BA;case`left`:case`right`:return t?VA:HA;default:return[]}}function WA(e,t,n,r){let i=jA(e),a=UA(AA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(RA)))),a}function GA(e){let t=AA(e);return DA[t]+e.slice(t.length)}function KA(e){return{top:0,right:0,bottom:0,left:0,...e}}function qA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:KA(e)}function JA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YA(e,t,n){let{reference:r,floating:i}=e,a=PA(t),o=FA(t),s=NA(o),c=AA(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function XA(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kA(t,e),p=qA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=JA(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=JA(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ZA=50,QA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:XA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=YA(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ZA&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=YA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},$A=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kA(e,t)||{};if(l==null)return{};let d=qA(u),f={x:n,y:r},p=FA(i),m=NA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=SA(d[_],T),D=SA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=OA(O,A,k),M=!c.arrow&&jA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),ej=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=AA(r),_=PA(o),v=AA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[GA(o)]:LA(o)),x=p!==`none`;!d&&x&&b.push(...WA(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=IA(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==PA(t))||T.every(e=>PA(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=PA(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function tj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nj(e){return xA.some(t=>e[t]>=0)}var rj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=kA(e,t);switch(i){case`referenceHidden`:{let e=tj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nj(e)}}}case`escaped`:{let e=tj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nj(e)}}}default:return{}}}}},ij=new Set([`left`,`top`]);async function aj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AA(n),s=jA(n),c=PA(n)===`y`,l=ij.has(o)?-1:1,u=a&&c?-1:1,d=kA(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var oj=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await aj(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},sj=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=PA(AA(i)),p=MA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=OA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=OA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},cj=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kA(e,t),u={x:n,y:r},d=PA(i),f=MA(d),p=u[f],m=u[d],h=kA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ij.has(AA(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},lj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=kA(e,t),u=await o.detectOverflow(t,l),d=AA(i),f=jA(i),p=PA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=SA(h-u[g],v),x=SA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=CA(u.left,0),t=CA(u.right,0),n=CA(u.top,0),r=CA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:CA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:CA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function uj(){return typeof window<`u`}function dj(e){return mj(e)?(e.nodeName||``).toLowerCase():`#document`}function fj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pj(e){return((mj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mj(e){return uj()?e instanceof Node||e instanceof fj(e).Node:!1}function hj(e){return uj()?e instanceof Element||e instanceof fj(e).Element:!1}function gj(e){return uj()?e instanceof HTMLElement||e instanceof fj(e).HTMLElement:!1}function _j(e){return!uj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fj(e).ShadowRoot}function vj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function yj(e){return/^(table|td|th)$/.test(dj(e))}function bj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xj=/transform|translate|scale|rotate|perspective|filter/,Sj=/paint|layout|strict|content/,Cj=e=>!!e&&e!==`none`,wj;function Tj(e){let t=hj(e)?kj(e):e;return Cj(t.transform)||Cj(t.translate)||Cj(t.scale)||Cj(t.rotate)||Cj(t.perspective)||!Dj()&&(Cj(t.backdropFilter)||Cj(t.filter))||xj.test(t.willChange||``)||Sj.test(t.contain||``)}function Ej(e){let t=jj(e);for(;gj(t)&&!Oj(t);){if(Tj(t))return t;if(bj(t))return null;t=jj(t)}return null}function Dj(){return wj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),wj}function Oj(e){return/^(html|body|#document)$/.test(dj(e))}function kj(e){return fj(e).getComputedStyle(e)}function Aj(e){return hj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jj(e){if(dj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_j(e)&&e.host||pj(e);return _j(t)?t.host:t}function Mj(e){let t=jj(e);return Oj(t)?e.ownerDocument?e.ownerDocument.body:e.body:gj(t)&&vj(t)?t:Mj(t)}function Nj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Mj(e),i=r===e.ownerDocument?.body,a=fj(r);if(i){let e=Pj(a);return t.concat(a,a.visualViewport||[],vj(r)?r:[],e&&n?Nj(e):[])}else return t.concat(r,Nj(r,[],n))}function Pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fj(e){let t=kj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wA(n)!==a||wA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ij(e){return hj(e)?e:e.contextElement}function Lj(e){let t=Ij(e);if(!gj(t))return EA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Fj(t),o=(a?wA(n.width):n.width)/r,s=(a?wA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rj=EA(0);function zj(e){let t=fj(e);return!Dj()||!t.visualViewport?Rj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fj(e)?!1:t}function Vj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ij(e),o=EA(1);t&&(r?hj(r)&&(o=Lj(r)):o=Lj(e));let s=Bj(a,n,r)?zj(a):EA(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=fj(a),t=r&&hj(r)?fj(r):r,n=e,i=Pj(n);for(;i&&r&&t!==n;){let e=Lj(i),t=i.getBoundingClientRect(),r=kj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fj(i),i=Pj(n)}}return JA({width:u,height:d,x:c,y:l})}function Hj(e,t){let n=Aj(e).scrollLeft;return t?t.left+n:Vj(pj(e)).left+n}function Uj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hj(e,n),y:n.top+t.scrollTop}}function Wj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pj(r),s=t?bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=EA(1),u=EA(0),d=gj(r);if((d||!d&&!a)&&((dj(r)!==`body`||vj(o))&&(c=Aj(r)),d)){let e=Vj(r);l=Lj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Uj(o,c):EA(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gj(e){return Array.from(e.getClientRects())}function Kj(e){let t=pj(e),n=Aj(e),r=e.ownerDocument.body,i=CA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=CA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Hj(e),s=-n.scrollTop;return kj(r).direction===`rtl`&&(o+=CA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qj=25;function Jj(e,t){let n=fj(e),r=pj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Dj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Hj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qj&&(a-=o)}else l<=qj&&(a+=l);return{width:a,height:o,x:s,y:c}}function Yj(e,t){let n=Vj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=gj(e)?Lj(e):EA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xj(e,t,n){let r;if(t===`viewport`)r=Jj(e,n);else if(t===`document`)r=Kj(pj(e));else if(hj(t))r=Yj(t,n);else{let n=zj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return JA(r)}function Zj(e,t){let n=jj(e);return n===t||!hj(n)||Oj(n)?!1:kj(n).position===`fixed`||Zj(n,t)}function Qj(e,t){let n=t.get(e);if(n)return n;let r=Nj(e,[],!1).filter(e=>hj(e)&&dj(e)!==`body`),i=null,a=kj(e).position===`fixed`,o=a?jj(e):e;for(;hj(o)&&!Oj(o);){let t=kj(o),n=Tj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||vj(o)&&!n&&Zj(e,o))?r=r.filter(e=>e!==o):i=t,o=jj(o)}return t.set(e,r),r}function $j(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bj(t)?[]:Qj(t,this._c):[].concat(n),r],o=Xj(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Xj(t,a[e],i);s=CA(n.top,s),c=SA(n.right,c),l=SA(n.bottom,l),u=CA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function eM(e){let{width:t,height:n}=Fj(e);return{width:t,height:n}}function tM(e,t,n){let r=gj(t),i=pj(t),a=n===`fixed`,o=Vj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=EA(0);function l(){c.x=Hj(i)}if(r||!r&&!a)if((dj(t)!==`body`||vj(i))&&(s=Aj(t)),r){let e=Vj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Uj(i,s):EA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function nM(e){return kj(e).position===`static`}function rM(e,t){if(!gj(e)||kj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return pj(e)===n&&(n=n.ownerDocument.body),n}function iM(e,t){let n=fj(e);if(bj(e))return n;if(!gj(e)){let t=jj(e);for(;t&&!Oj(t);){if(hj(t)&&!nM(t))return t;t=jj(t)}return n}let r=rM(e,t);for(;r&&yj(r)&&nM(r);)r=rM(r,t);return r&&Oj(r)&&nM(r)&&!Tj(r)?n:r||Ej(e)||n}var aM=async function(e){let t=this.getOffsetParent||iM,n=this.getDimensions,r=await n(e.floating);return{reference:tM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oM(e){return kj(e).direction===`rtl`}var sM={convertOffsetParentRelativeRectToViewportRelativeRect:Wj,getDocumentElement:pj,getClippingRect:$j,getOffsetParent:iM,getElementRects:aM,getClientRects:Gj,getDimensions:eM,getScale:Lj,isElement:hj,isRTL:oM};function cM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lM(e,t){let n=null,r,i=pj(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=TA(d),h=TA(i.clientWidth-(u+f)),g=TA(i.clientHeight-(d+p)),_=TA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:CA(0,SA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!cM(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function uM(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ij(e),u=i||a?[...l?Nj(l):[],...t?Nj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lM(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Vj(e):null;c&&g();function g(){let t=Vj(e);h&&!cM(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dM=oj,fM=sj,pM=ej,mM=lj,hM=rj,gM=$A,_M=cj,vM=(e,t,n)=>{let r=new Map,i={platform:sM,...n},a={...i.platform,_c:r};return QA(e,t,{...i,platform:a})},yM=typeof document<`u`?h.useLayoutEffect:function(){};function bM(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bM(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!bM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function xM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function SM(e,t){let n=xM(e);return Math.round(t*n)/n}function CM(e){let t=h.useRef(e);return yM(()=>{t.current=e}),t}function wM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);bM(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=CM(c),O=CM(i),k=CM(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),vM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!bM(T.current,t)&&(T.current=t,au.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);yM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);yM(()=>(j.current=!0,()=>{j.current=!1}),[]),yM(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=SM(N.floating,u.x),r=SM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...xM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var TM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:gM({element:r.current,padding:i}).fn(n):r?gM({element:r,padding:i}).fn(n):{}}}},EM=(e,t)=>{let n=dM(e);return{name:n.name,fn:n.fn,options:[e,t]}},DM=(e,t)=>{let n=fM(e);return{name:n.name,fn:n.fn,options:[e,t]}},OM=(e,t)=>({fn:_M(e).fn,options:[e,t]}),kM=(e,t)=>{let n=pM(e);return{name:n.name,fn:n.fn,options:[e,t]}},AM=(e,t)=>{let n=mM(e);return{name:n.name,fn:n.fn,options:[e,t]}},jM=(e,t)=>{let n=hM(e);return{name:n.name,fn:n.fn,options:[e,t]}},MM=(e,t)=>{let n=TM(e);return{name:n.name,fn:n.fn,options:[e,t]}},NM=`Arrow`,PM=h.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(ou.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});PM.displayName=NM;var FM=PM;function IM(e){let[t,n]=h.useState(void 0);return Tu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var LM=`Popper`,[RM,zM]=Xl(LM),[BM,VM]=RM(LM),HM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null);return(0,w.jsx)(BM,{scope:t,anchor:r,onAnchorChange:i,children:n})};HM.displayName=LM;var UM=`PopperAnchor`,WM=h.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=VM(UM,n),o=h.useRef(null),s=Jl(t,o),c=h.useRef(null);return h.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,w.jsx)(ou.div,{...i,ref:s})});WM.displayName=UM;var GM=`PopperContent`,[KM,qM]=RM(GM),JM=h.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...g}=e,_=VM(GM,n),[v,y]=h.useState(null),b=Jl(t,e=>y(e)),[x,S]=h.useState(null),C=IM(x),T=C?.width??0,E=C?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(QM),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=wM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>uM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[EM({mainAxis:i+E,alignmentAxis:o}),c&&DM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?OM():void 0,...j}),c&&kM({...j}),AM({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&MM({element:x,padding:s}),$M({arrowWidth:T,arrowHeight:E}),f&&jM({strategy:`referenceHidden`,...j})]}),[L,R]=eN(P),ee=cu(m);Tu(()=>{F&&ee?.()},[F,ee]);let te=I.arrow?.x,z=I.arrow?.y,B=I.arrow?.centerOffset!==0,[V,ne]=h.useState();return Tu(()=>{v&&ne(window.getComputedStyle(v).zIndex)},[v]),(0,w.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(KM,{scope:n,placedSide:L,onArrowChange:S,arrowX:te,arrowY:z,shouldHideArrow:B,children:(0,w.jsx)(ou.div,{"data-side":L,"data-align":R,...g,ref:b,style:{...g.style,animation:F?void 0:`none`}})})})});JM.displayName=GM;var YM=`PopperArrow`,XM={top:`bottom`,right:`left`,bottom:`top`,left:`right`},ZM=h.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=qM(YM,n),a=XM[i.placedSide];return(0,w.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,w.jsx)(FM,{...r,ref:t,style:{...r.style,display:`block`}})})});ZM.displayName=YM;function QM(e){return e!==null}var $M=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=eN(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function eN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var tN=HM,nN=WM,rN=JM,iN=ZM;function aN(e){let t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},sN=new WeakMap,cN=new WeakMap,lN={},uN=0,dN=function(e){return e&&(e.host||dN(e.parentNode))},fN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=dN(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},pN=function(e,t,n,r){var i=fN(t,Array.isArray(e)?e:[e]);lN[n]||(lN[n]=new WeakMap);var a=lN[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(sN.get(e)||0)+1,l=(a.get(e)||0)+1;sN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&cN.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),uN++,function(){o.forEach(function(e){var t=sN.get(e)-1,i=a.get(e)-1;sN.set(e,t),a.set(e,i),t||(cN.has(e)||e.removeAttribute(r),cN.delete(e)),i||e.removeAttribute(n)}),uN--,uN||(sN=new WeakMap,sN=new WeakMap,cN=new WeakMap,lN={})}},mN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||oN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),pN(r,i,n,`aria-hidden`)):function(){return null}},hN=function(){return hN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hN.apply(this,arguments)};function gN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _N(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var vN=`right-scroll-bar-position`,yN=`width-before-scroll-bar`,bN=`with-scroll-bars-hidden`,xN=`--removed-body-scroll-bar-size`;function SN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function CN(e,t){var n=(0,h.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var wN=typeof window<`u`?h.useLayoutEffect:h.useEffect,TN=new WeakMap;function EN(e,t){var n=CN(t||null,function(t){return e.forEach(function(e){return SN(e,t)})});return wN(function(){var t=TN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||SN(e,null)}),i.forEach(function(e){r.has(e)||SN(e,a)})}TN.set(n,e)},[e]),n}function DN(e){return e}function ON(e,t){t===void 0&&(t=DN);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function kN(e){e===void 0&&(e={});var t=ON(null);return t.options=hN({async:!0,ssr:!1},e),t}var AN=function(e){var t=e.sideCar,n=gN(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return h.createElement(r,hN({},n))};AN.isSideCarExport=!0;function jN(e,t){return e.useMedium(t),AN}var MN=kN(),NN=function(){},PN=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:NN,onWheelCapture:NN,onTouchMoveCapture:NN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=gN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=EN([n,t]),w=hN(hN({},x),i);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:MN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?h.cloneElement(h.Children.only(s),hN(hN({},w),{ref:C})):h.createElement(y,hN({},w,{className:c,ref:C}),s))});PN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},PN.classNames={fullWidth:yN,zeroRight:vN};var FN,IN=function(){if(FN)return FN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function LN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=IN();return t&&e.setAttribute(`nonce`,t),e}function RN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var BN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=LN())&&(RN(t,n),zN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VN=function(){var e=BN();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HN=function(){var e=VN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},UN={left:0,top:0,right:0,gap:0},WN=function(e){return parseInt(e||``,10)||0},GN=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[WN(n),WN(r),WN(i)]},KN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return UN;var t=GN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qN=HN(),JN=`data-scroll-locked`,YN=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
76
76
|
.${bN} {
|
|
77
77
|
overflow: hidden ${r};
|
|
78
78
|
padding-right: ${s}px ${r};
|
|
@@ -113,7 +113,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
113
113
|
.block-interactivity-${e} {pointer-events: none;}
|
|
114
114
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
115
115
|
`},vP=0,yP=[];function bP(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),i=h.useState(vP++)[0],a=h.useState(HN)[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=_N([e.lockRef.current],(e.shards||[]).map(hP),!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=h.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=pP(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=oP(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=oP(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 fP(h,t,e,h===`h`?s:c,!0)},[]),c=h.useCallback(function(e){var n=e;if(!(!yP.length||yP[yP.length-1]!==a)){var r=`deltaY`in n?mP(n):pP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&gP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(hP).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=h.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:xP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=h.useCallback(function(e){n.current=pP(e),r.current=void 0},[]),d=h.useCallback(function(t){l(t.type,mP(t),t.target,s(t,e.lockRef.current))},[]),f=h.useCallback(function(t){l(t.type,pP(t),t.target,s(t,e.lockRef.current))},[]);h.useEffect(function(){return yP.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,tP),document.addEventListener(`touchmove`,c,tP),document.addEventListener(`touchstart`,u,tP),function(){yP=yP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,tP),document.removeEventListener(`touchmove`,c,tP),document.removeEventListener(`touchstart`,u,tP)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(a,{styles:_P(i)}):null,p?h.createElement(QN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var SP=jN(MN,bP),CP=h.forwardRef(function(e,t){return h.createElement(PN,hN({},e,{ref:t,sideCar:SP}))});CP.classNames=PN.classNames;var wP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],TP=[` `,`Enter`],EP=`Select`,[DP,OP,kP]=iu(EP),[AP,jP]=Xl(EP,[kP,zM]),MP=zM(),[NP,PP]=AP(EP),[FP,IP]=AP(EP),LP=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,g=MP(t),[_,v]=h.useState(null),[y,b]=h.useState(null),[x,S]=h.useState(!1),C=Qk(l),[T,E]=Pu({prop:r,defaultProp:i??!1,onChange:a,caller:EP}),[D,O]=Pu({prop:o,defaultProp:s,onChange:c,caller:EP}),k=h.useRef(null),A=_?m||!!_.closest(`form`):!0,[j,M]=h.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,w.jsx)(tN,{...g,children:(0,w.jsxs)(NP,{required:p,scope:t,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:bA(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:C,triggerPointerDownPosRef:k,disabled:f,children:[(0,w.jsx)(DP.Provider,{scope:t,children:(0,w.jsx)(FP,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:h.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,w.jsxs)(MF,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:e=>O(e.target.value),disabled:f,form:m,children:[D===void 0?(0,w.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};LP.displayName=EP;var RP=`SelectTrigger`,zP=h.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=MP(n),o=PP(RP,n),s=o.disabled||r,c=Jl(t,o.onTriggerChange),l=OP(n),u=h.useRef(`touch`),[d,f,p]=PF(e=>{let t=l().filter(e=>!e.disabled),n=FF(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,w.jsx)(nN,{asChild:!0,...a,children:(0,w.jsx)(ou.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":NF(o.value)?``:void 0,...i,ref:c,onClick:Gl(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Gl(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:Gl(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&wP.includes(e.key)&&(m(),e.preventDefault())})})})});zP.displayName=RP;var BP=`SelectValue`,VP=h.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=PP(BP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Jl(t,c.onValueNodeChange);return Tu(()=>{l(u)},[l,u]),(0,w.jsx)(ou.span,{...s,ref:d,style:{pointerEvents:`none`},children:NF(c.value)?(0,w.jsx)(w.Fragment,{children:o}):a})});VP.displayName=BP;var HP=`SelectIcon`,UP=h.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,w.jsx)(ou.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});UP.displayName=HP;var WP=`SelectPortal`,GP=e=>(0,w.jsx)(Du,{asChild:!0,...e});GP.displayName=WP;var KP=`SelectContent`,qP=h.forwardRef((e,t)=>{let n=PP(KP,e.__scopeSelect),[r,i]=h.useState();if(Tu(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?au.createPortal((0,w.jsx)(YP,{scope:e.__scopeSelect,children:(0,w.jsx)(DP.Slot,{scope:e.__scopeSelect,children:(0,w.jsx)(`div`,{children:e.children})})}),t):null}return(0,w.jsx)($P,{...e,ref:t})});qP.displayName=KP;var JP=10,[YP,XP]=AP(KP),ZP=`SelectContentImpl`,QP=Ql(`SelectContent.RemoveScroll`),$P=h.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:g,avoidCollisions:_,...v}=e,y=PP(KP,n),[b,x]=h.useState(null),[S,C]=h.useState(null),T=Jl(t,e=>x(e)),[E,D]=h.useState(null),[O,k]=h.useState(null),A=OP(n),[j,M]=h.useState(!1),N=h.useRef(!1);h.useEffect(()=>{if(b)return mN(b)},[b]),eA();let P=h.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&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,S]),F=h.useCallback(()=>P([E,b]),[P,E,b]);h.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=y;h.useEffect(()=>{if(b){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():b.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})}}},[b,I,L]),h.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[R,ee]=PF(e=>{let t=A().filter(e=>!e.disabled),n=FF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),te=h.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&(D(e),r&&(N.current=!0))},[y.value]),z=h.useCallback(()=>b?.focus(),[b]),B=h.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&k(e)},[y.value]),V=r===`popper`?rF:tF,ne=V===rF?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:_}:{};return(0,w.jsx)(YP,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:E,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:j,searchRef:R,children:(0,w.jsx)(CP,{as:QP,allowPinchZoom:!0,children:(0,w.jsx)(oA,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Gl(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,w.jsx)(gu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,w.jsx)(V,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...ne,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Gl(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(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()}})})})})})})});$P.displayName=ZP;var eF=`SelectItemAlignedPosition`,tF=h.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=PP(KP,n),o=XP(KP,n),[s,c]=h.useState(null),[l,u]=h.useState(null),d=Jl(t,e=>u(e)),f=OP(n),p=h.useRef(!1),m=h.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=h.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.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-JP,d=Xk(a,[JP,Math.max(JP,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-JP,d=Xk(a,[JP,Math.max(JP,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-JP*2,u=g.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-JP,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=m+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${JP}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);Tu(()=>b(),[b]);let[x,S]=h.useState();return Tu(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,w.jsx)(iF,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:h.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,w.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,w.jsx)(ou.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});tF.displayName=eF;var nF=`SelectPopperPosition`,rF=h.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=JP,...a}=e,o=MP(n);return(0,w.jsx)(rN,{...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)`}})});rF.displayName=nF;var[iF,aF]=AP(KP,{}),oF=`SelectViewport`,sF=h.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=XP(oF,n),o=aF(oF,n),s=Jl(t,a.onViewportChange),c=h.useRef(0);return(0,w.jsxs)(w.Fragment,{children:[(0,w.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,w.jsx)(DP.Slot,{scope:n,children:(0,w.jsx)(ou.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Gl(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-JP*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})})})]})});sF.displayName=oF;var cF=`SelectGroup`,[lF,uF]=AP(cF),dF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=bA();return(0,w.jsx)(lF,{scope:n,id:i,children:(0,w.jsx)(ou.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});dF.displayName=cF;var fF=`SelectLabel`,pF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=uF(fF,n);return(0,w.jsx)(ou.div,{id:i.id,...r,ref:t})});pF.displayName=fF;var mF=`SelectItem`,[hF,gF]=AP(mF),_F=h.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=PP(mF,n),c=XP(mF,n),l=s.value===r,[u,d]=h.useState(a??``),[f,p]=h.useState(!1),m=Jl(t,e=>c.itemRefCallback?.(e,r,i)),g=bA(),_=h.useRef(`touch`),v=()=>{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,w.jsx)(hF,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:h.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,w.jsx)(DP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,w.jsx)(ou.div,{role:`option`,"aria-labelledby":g,"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:Gl(o.onFocus,()=>p(!0)),onBlur:Gl(o.onBlur,()=>p(!1)),onClick:Gl(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:Gl(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:Gl(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Gl(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Gl(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Gl(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(TP.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})});_F.displayName=mF;var vF=`SelectItemText`,yF=h.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=PP(vF,n),s=XP(vF,n),c=gF(vF,n),l=IP(vF,n),[u,d]=h.useState(null),f=Jl(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=h.useMemo(()=>(0,w.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Tu(()=>(g(m),()=>_(m)),[g,_,m]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(ou.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?au.createPortal(a.children,o.valueNode):null]})});yF.displayName=vF;var bF=`SelectItemIndicator`,xF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return gF(bF,n).isSelected?(0,w.jsx)(ou.span,{"aria-hidden":!0,...r,ref:t}):null});xF.displayName=bF;var SF=`SelectScrollUpButton`,CF=h.forwardRef((e,t)=>{let n=XP(SF,e.__scopeSelect),r=aF(SF,e.__scopeSelect),[i,a]=h.useState(!1),o=Jl(t,r.onScrollButtonChange);return Tu(()=>{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,w.jsx)(EF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});CF.displayName=SF;var wF=`SelectScrollDownButton`,TF=h.forwardRef((e,t)=>{let n=XP(wF,e.__scopeSelect),r=aF(wF,e.__scopeSelect),[i,a]=h.useState(!1),o=Jl(t,r.onScrollButtonChange);return Tu(()=>{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,w.jsx)(EF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});TF.displayName=wF;var EF=h.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=XP(`SelectScrollButton`,n),o=h.useRef(null),s=OP(n),c=h.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),Tu(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,w.jsx)(ou.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Gl(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Gl(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Gl(i.onPointerLeave,()=>{c()})})}),DF=`SelectSeparator`,OF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,w.jsx)(ou.div,{"aria-hidden":!0,...r,ref:t})});OF.displayName=DF;var kF=`SelectArrow`,AF=h.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=MP(n),a=PP(kF,n),o=XP(kF,n);return a.open&&o.position===`popper`?(0,w.jsx)(iN,{...i,...r,ref:t}):null});AF.displayName=kF;var jF=`SelectBubbleInput`,MF=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=h.useRef(null),a=Jl(r,i),o=aN(t);return h.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,w.jsx)(ou.select,{...n,style:{...Lu,...n.style},ref:a,defaultValue:t})});MF.displayName=jF;function NF(e){return e===``||e===void 0}function PF(e){let t=cu(e),n=h.useRef(``),r=h.useRef(0),i=h.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=h.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function FF(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=IF(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 IF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var LF=LP,RF=zP,zF=VP,BF=UP,VF=GP,HF=qP,UF=sF,WF=dF,GF=pF,KF=_F,qF=yF,JF=xF,YF=CF,XF=TF,ZF=OF,QF=LF,$F=WF,eI=zF,tI=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,w.jsxs)(RF,{suppressHydrationWarning:!0,className:G(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,w.jsx)(BF,{asChild:!0,children:(0,w.jsx)(nf,{className:`size-4 opacity-50`})})]}),nI=({className:e,...t})=>(0,w.jsx)(YF,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(tf,{})}),rI=({className:e,...t})=>(0,w.jsx)(XF,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,w.jsx)(Qd,{})}),iI=({className:e,children:t,position:n=`popper`,...r})=>(0,w.jsx)(VF,{children:(0,w.jsxs)(HF,{className:G(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,w.jsx)(nI,{}),(0,w.jsx)(UF,{className:G(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,w.jsx)(rI,{})]})}),aI=({className:e,...t})=>(0,w.jsx)(GF,{className:G(`px-1 py-0.5 font-semibold text-sm`,e),...t}),oI=({className:e,children:t,...n})=>(0,w.jsxs)(KF,{className:G(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,w.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,w.jsx)(JF,{children:(0,w.jsx)(Zd,{className:`size-4`})})}),(0,w.jsx)(qF,{children:t})]}),sI=({className:e,...t})=>(0,w.jsx)(ZF,{className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=QF;J.Group=$F,J.Value=eI,J.Trigger=tI,J.ScrollUpButton=nI,J.ScrollDownButton=rI,J.Content=iI,J.Label=aI,J.Item=oI,J.Separator=sI;var cI=e=>{let t=(0,_.c)(11),{availableFormats:n}=e,{codeFormat:r,setCodeFormat:i,setContentDeclarationFormat:a}=Lk(),o=Cr(Yk),s;t[0]===n?s=t[1]:(s=e=>!n||n.includes(e),t[0]=n,t[1]=s);let c=s,l;t[2]!==i||t[3]!==a?(l=e=>{i(e),a(e)},t[2]=i,t[3]=a,t[4]=l):l=t[4];let u;return t[5]!==r||t[6]!==o.codeFormat.label.value||t[7]!==o.codeFormat.placeholder.value||t[8]!==c||t[9]!==l?(u=(0,w.jsxs)(J,{value:r,onValueChange:l,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":o.codeFormat.label.value,children:(0,w.jsx)(J.Value,{placeholder:o.codeFormat.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[c(`typescript`)&&(0,w.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),c(`esm`)&&(0,w.jsx)(J.Item,{value:`esm`,children:`ESM`}),c(`commonjs`)&&(0,w.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`})]})]}),t[5]=r,t[6]=o.codeFormat.label.value,t[7]=o.codeFormat.placeholder.value,t[8]=c,t[9]=l,t[10]=u):u=t[10],u},lI=()=>{let e=(0,_.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=Lk(),r=Cr(Yk),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,w.jsxs)(J,{value:t,onValueChange:n,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,w.jsx)(J.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,w.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`}),(0,w.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,w.jsx)(J.Item,{value:`json`,children:`JSON`})]})]}),e[0]=r.contentDeclarationFormat.label.value,e[1]=r.contentDeclarationFormat.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},uI={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},dI=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),fI=({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,w.jsx)(NC,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:G(`absolute z-50 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});dI.Detail=fI;var pI=e=>(0,w.jsx)(dI,{...e}),mI=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,h.useRef)(null),[i,a]=(0,h.useState)(e),[o,s]=(0,h.useState)(t),[c,l]=(0,h.useState)(void 0);return(0,h.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,w.jsx)(fI,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},hI=pI;hI.Detail=mI;var gI={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`]},_I=e=>{let t=(0,_.c)(6),{content:n,...r}=e,[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(!1),{label:c}=Cr(gI),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,h.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,w.jsx)(RC,{Icon:i?rf:af,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})},vI=e=>{let{code:t,...n}=e,{title:r,description:i}=Cr(uI);return(0,w.jsxs)(hI,{identifier:`copy`,children:[(0,w.jsx)(_I,{content:t,...n}),(0,w.jsxs)(hI.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r}),(0,w.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},yI=()=>{let e=(0,_.c)(5),{packageManager:t,setPackageManager:n}=Lk(),r=Cr(Yk);Cr(Yk);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,w.jsxs)(J,{value:t,onValueChange:n,children:[(0,w.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,w.jsx)(J.Value,{placeholder:r.packageManager.placeholder.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`npm`,children:`npm`}),(0,w.jsx)(J.Item,{value:`pnpm`,children:`pnpm`}),(0,w.jsx)(J.Item,{value:`yarn`,children:`yarn`}),(0,w.jsx)(J.Item,{value:`bun`,children:`bun`})]})]}),e[0]=r.packageManager.label.value,e[1]=r.packageManager.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},bI=700,xI=new Set([`tsx`,`jsx`]),SI=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},CI=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:u=!0,...d})=>{let{codeFormat:f,contentDeclarationFormat:p}=Lk(),m=(0,h.useMemo)(()=>SI(c),[c]),g=(0,h.useMemo)(()=>SI(l),[l]),_=m!==void 0&&m.length>1&&m.includes(`typescript`),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_||v,b=v?p:f,x=(0,h.useMemo)(()=>{let e=v?g:m;if(!e)return e;let n=e.filter(e=>e!==`json`);return xI.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[v,g,m,t]),S=(0,h.useMemo)(()=>!x||x.includes(b)?b:x[x.length-1]??`typescript`,[x,b]),[C,T]=(0,h.useState)(o);(0,h.useEffect)(()=>{if(!y||S===`typescript`){T(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await Pn(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{deriveFileName:e}},[]);e||T(t(o,S))})(),()=>{e=!0}},[o,y,S]);let E=(0,h.useMemo)(()=>e?.endsWith(`
|
|
116
|
-
`)?e.slice(0,-1):e,[e]),[D,O]=(0,h.useState)(E);(0,h.useEffect)(()=>{if(!y||S===`typescript`){O(E);return}let e=!1;return(async()=>{let{transformCode:t}=await Pn(async()=>{let{transformCode:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e}},[]);e||O(t(E,S))})(),()=>{e=!0}},[E,y,S]);let k=s||c||l;return(0,w.jsx)(Jk,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,w.jsxs)(NC,{className:G(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...d,children:[r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,w.jsx)(`span`,{className:`truncate`,children:C??t}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,w.jsx)(yI,{}),c&&(0,w.jsx)(cI,{availableFormats:x}),l&&(0,w.jsx)(lI,{})]})]}),(0,w.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,w.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`,k&&`h-11`),children:(0,w.jsx)(vI,{code:D})})})]}),(0,w.jsx)(Vk,{minHeight:bI,isRollable:u,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:y?(0,w.jsx)(Kk,{originalLang:t,targetFormat:S,isDarkMode:n,children:E}):(0,w.jsx)(Wk,{lang:t,isDarkMode:n,children:E})})]})})},wI=(0,h.createContext)({tabsValues:{},setTabsValues:()=>{}}),TI=()=>(0,h.useContext)(wI),EI=e=>{let t=(0,_.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,h.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,w.jsx)(wI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},DI=e=>{let t=(0,_.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,h.useRef)(null),[g,v]=(0,h.useState)(!1),[y,b]=(0,h.useState)(0),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=x):x=t[0];let S=(0,h.useRef)(x),C=(0,h.useRef)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=w):w=t[1];let T=w,E;t[2]!==o||t[3]!==a?(E=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=E):E=t[4];let D=E,O;t[5]===u?O=t[6]:(O=e=>{u&&S.current.pointerId===null&&(S.current.pointerId=e.pointerId,S.current.startX=e.clientX,S.current.startY=e.clientY,S.current.lastX=e.clientX,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current=!1,v(!1),b(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==g?(A=e=>{if(!u||S.current.pointerId!==e.pointerId)return;let t=T();if(!t)return;let n=e.clientX-S.current.startX,r=e.clientY-S.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){C.current=!0;return}}if(!S.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(S.current.axisLocked=!0,S.current.isHorizontal=e>t)}if(S.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),g||v(!0),b(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=g,t[11]=A):A=t[11];let j=A,M;t[12]!==y||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=y;if(v(!1),b(0),S.current.pointerId=null,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current){C.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=y,t[13]=r,t[14]=i,t[15]=d,t[16]=M):M=t[16];let N=M,P;t[17]!==u||t[18]!==N?(P=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[17]=u,t[18]=N,t[19]=P):P=t[19];let F=P,I;t[20]!==u||t[21]!==N?(I=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=I):I=t[22];let L=I,R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{b(0),v(!1)},t[23]=R):R=t[23];let ee;t[24]===a?ee=t[25]:(ee=[a],t[24]=a,t[25]=ee),(0,h.useEffect)(R,ee);let te;t[26]===f?te=t[27]:(te={touchAction:f},t[26]=f,t[27]=te);let z;t[28]!==L||t[29]!==k||t[30]!==j||t[31]!==F||t[32]!==te?(z={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:F,onPointerCancel:L,style:te},t[28]=L,t[29]=k,t[30]=j,t[31]=F,t[32]=te,t[33]=z):z=t[33];let B;return t[34]!==y||t[35]!==g||t[36]!==z?(B={containerRef:m,isDragging:g,dragDeltaPct:y,containerProps:z},t[34]=y,t[35]=g,t[36]=z,t[37]=B):B=t[37],B},OI=Rd(`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`}}),kI=Rd(`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`}}),AI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,h.useRef)([]),c=(0,h.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=WC(s,{isHoverable:i,orientation:a});return(0,h.useEffect)(()=>{u()},[t]),(0,w.jsxs)(`div`,{className:G(OI({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,h.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,w.jsx)(`div`,{className:G(kI({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},jI=(0,h.createContext)(void 0),MI=Rd(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),NI=({children:e,...t})=>(0,w.jsx)(`div`,{...t,children:e});NI.displayName=`TabItem`;var PI=Object.assign(e=>{let t=(0,_.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=h.Children.toArray(a).filter(FI),d=u[0]?.props?.value,{tabsValues:f,setTabsValues:p}=TI(),[m,g]=(0,h.useState)(n??d??``),v=(r&&typeof f==`object`?f?.[r]:m)??n??d,y;t[0]===v?y=t[1]:(y=e=>e.props.value===v,t[0]=v,t[1]=y);let b=u.findIndex(y),x=u.length,{containerProps:S,dragDeltaPct:C,isDragging:T}=DI({itemIndex:b,itemCount:x,onSwipeLeft:()=>{let e=u[Math.min(x-1,b+1)]?.props?.value;e&&E(e)},onSwipeRight:()=>{let e=u[Math.max(0,b-1)]?.props?.value;e&&E(e)}}),E=e=>{g(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},D={activeTab:m??d??``,setActiveTab:E},O;return t[2]!==b||t[3]!==c?(O=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===b;return(0,w.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:G(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,w.jsx)(`div`,{className:G(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=b,t[3]=c,t[4]=O):O=t[4],(0,w.jsx)(jI.Provider,{value:D,children:(0,w.jsxs)(`div`,{className:G(MI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,w.jsx)(`div`,{className:G(`flex shrink-0 gap-3 p-3`,s),children:(0,w.jsx)(AI,{selectedChoice:v,tabs:u.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=v===n;return(0,w.jsx)(`button`,{className:G(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&E(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,w.jsx)(`div`,{className:G(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...S,children:(0,w.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:G(`grid w-full min-w-0`,c&&`h-full`,T?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${b*100-(T?C:0)}%)`},children:u.map(O)})})]})})},{Item:NI});function FI(e){return(0,h.isValidElement)(e)&&e.type===NI}var II=e=>{let t=(0,_.c)(3),[n,r]=(0,h.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,h.useEffect)(i,a),n},LI=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()})}},RI=[],zI=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(LI.subscribe,LI.getSnapshot,BI),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:LI.addBlockage,removeBlockage:LI.removeBlockage,isElementScrollBlocked:LI.isElementScrollBlocked},e[0]=t,e[1]=n),n};function BI(){return RI}var VI=e=>{let t=(0,_.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}=zI(),d=II(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,h.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 g;return t[12]===m?g=t[13]:(g={isScrollBlocked:m},t[12]=m,t[13]=g),g},HI=Rd(`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`}}),UI={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`},WI=EC.create(NC),GI=e=>{let t=(0,_.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,g=c===void 0?`md`:c,v=u===void 0?!1:u,y=d===void 0?!0:d,b=f===void 0?`none`:f,x=II(i),S=r&&y,C;t[0]===S?C=t[1]:(C={key:`modal`,disableScroll:S},t[0]=S,t[1]=C),VI(C);let T,E;if(t[2]!==r||t[3]!==a?(T=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},E=[r,a],t[2]=r,t[3]=a,t[4]=T,t[5]=E):(T=t[4],E=t[5]),(0,h.useEffect)(T,E),!x){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[6]=e):e=t[6],e}let D=!!s,O=UI[b||`none`],k;return t[7]===a?k=t[8]:(k=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=k),(0,au.createPortal)((0,w.jsx)(EC.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:k,"aria-hidden":!r,children:(0,w.jsxs)(WI,{onClick:KI,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:HI({size:g,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,w.jsxs)(`div`,{className:G(`relative flex-none px-4 pt-4`,m&&D?`flex items-start`:m?`flex justify-end`:D?`items-center`:`hidden`),children:[D&&(0,w.jsx)(Mk,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Cf,size:`icon-md`})]}),(0,w.jsx)(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,v===!0&&`overflow-auto`,v===`y`&&`overflow-y-auto overflow-x-hidden`,v===`x`&&`overflow-x-auto overflow-y-hidden`,!v&&`overflow-visible`),children:(0,w.jsx)(`div`,{className:G(`flex h-full w-full flex-1 flex-col`,O),children:n})})]})}),x)};function KI(e){return e.stopPropagation()}var qI={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},JI=e=>{let t=(0,_.c)(6),{setIsModalOpen:n}=e,{modal:r}=Cr(qI),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,w.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,w.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,w.jsxs)(hI,{identifier:`expand`,children:[(0,w.jsx)(RC,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:ff}),(0,w.jsxs)(hI.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r.title}),(0,w.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},YI=(0,h.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,w.jsx)(`table`,{ref:r,className:G(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),XI=.55,ZI=5,QI=30,$I=(e,t,n)=>{let r=(0,_.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(QI,Math.max(ZI,(n[t]??0)*XI));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${QI}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,h.useEffect)(i,n)},eL=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null);$I(u,d,[a.children,o]),(0,h.useEffect)(()=>{if(o&&c!==null&&d.current){let e=d.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,h.useEffect)(()=>{o||l(null)},[o]);let f=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(l(t.rowIndex),s(!0))}i?.(e)};return(0,w.jsxs)(`div`,{className:`group relative`,children:[n&&(0,w.jsx)(JI,{setIsModalOpen:s}),(0,w.jsx)(Vk,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,w.jsx)(YI,{ref:u,className:e,isInteractive:r??n,onClick:f,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f(e)},...a})}),(0,w.jsx)(GI,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,w.jsx)(`div`,{className:`grid`,children:(0,w.jsx)(YI,{ref:d,className:G(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,w.jsx)(w.Fragment,{})})]})};function tL(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var nL=e=>{let t=(0,_.c)(2),{src:n,className:r,title:i,...a}=e,[o,s]=(0,h.useState)(!1),{href:c,label:l}=tL(n),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(!0),t[0]=u):u=t[0];let d;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>s(!1),t[1]=d):d=t[1],(0,w.jsxs)(NC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,w.jsx)(`iframe`,{...a,src:n,title:i,className:G(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-neutral/30 border-t bg-card/40 px-3 py-1`,children:[c?(0,w.jsx)(_k,{href:c,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-neutral text-xs underline-offset-2 hover:text-text hover:underline`,children:l}):(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,w.jsx)(RC,{variant:`hoverable`,size:`icon-md`,onClick:u,label:`Open embedded page in fullscreen`,Icon:ff})]}),(0,w.jsx)(GI,{isOpen:o,onClose:d,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&n?(0,w.jsx)(NC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,w.jsx)(`iframe`,{...a,src:n,title:i??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},rL=e=>(0,w.jsx)(Ak,{isClickable:!0,className:`text-text`,...e}),iL=e=>(0,w.jsx)(jk,{isClickable:!0,className:`mt-16 text-text`,...e}),aL=e=>(0,w.jsx)(Mk,{isClickable:!0,className:`mt-5 text-text`,...e}),oL=e=>(0,w.jsx)(Nk,{isClickable:!0,className:`mt-3 text-text`,...e}),sL=e=>(0,w.jsx)(Pk,{isClickable:!0,className:`mt-3 text-text`,...e}),cL=e=>(0,w.jsx)(Fk,{isClickable:!0,className:`mt-3 text-text`,...e}),lL=e=>(0,w.jsx)(`strong`,{className:`text-text`,...e}),uL=(0,h.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,w.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,w.jsx)(CI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),dL=e=>function(t){return(0,w.jsx)(uL,{...t,isDarkMode:e})},fL=({className:e,...t})=>(0,w.jsx)(`blockquote`,{className:G(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),pL=({className:e,...t})=>(0,w.jsx)(`ul`,{className:G(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),mL=({className:e,...t})=>(0,w.jsx)(`ol`,{className:G(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),hL=({className:e,alt:t,src:n,...r})=>(0,w.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:G(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),gL=e=>t=>(0,w.jsx)(_k,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),_L={h1:rL,h2:iL,h3:aL,h4:oL,h5:sL,h6:cL,strong:lL,blockquote:fL,ul:pL,ol:mL,img:hL,pre:e=>(0,w.jsx)(w.Fragment,{children:e.children}),table:e=>(0,w.jsx)(eL,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,w.jsx)(`th`,{className:G(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,w.jsx)(`tr`,{className:G(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,w.jsx)(`td`,{className:G(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,w.jsx)(`hr`,{className:G(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,w.jsx)(PI,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:PI.Item,Columns:({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`flex-1`,e),...t}),iframe:e=>(0,w.jsx)(nL,{...e})},vL=(e,t)=>({..._L,code:dL(e),a:gL(t)}),yL=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,w.jsx)(Rk,{children:(0,w.jsx)(EI,{children:Dr(e,{components:{...vL(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),bL=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}},xL=e=>{let t=(0,_.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=bL(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,h.useState)(a??null),[l,u]=(0,h.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,h.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,w.jsxs)(`div`,{className:`flex gap-1`,children:[(0,w.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,w.jsx)(J.Trigger,{className:`w-20`,children:(0,w.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`<`,children:`<`}),(0,w.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,w.jsx)(J.Item,{value:`=`,children:`=`}),(0,w.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,w.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,w.jsx)(hT,{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},SL=e=>{let t=(0,_.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=iT(),s=nT(),{mutate:c,isPending:l}=IO(),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,w.jsx)(lk,{variant:`default`,onContentChange:u,additionalButtons:(0,w.jsx)(RC,{Icon:Sf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},CL=e=>{let t=(0,_.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=iT(),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,w.jsx)(UO,{variant:`default`,onContentChange:o,...i})},wL=[{content:`False`,value:!1},{content:`True`,value:!0}],TL=e=>{let t=(0,_.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=iT(),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,w.jsx)(ZC,{choices:wL,value:!0,onChange:o,color:`text`,size:`sm`,...i})},EL=e=>{let t=(0,_.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=wr(),{selectedLocales:c,availableLocales:l}=VO(),u=n[O],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[O],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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:pr(e,o)})}),(0,w.jsx)(`tr`,{className:`flex`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:p[e]??Ow(p[s]),keyPath:[...r,{type:O,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,w.jsx)(`table`,{className:`w-full`,children:(0,w.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},DL=e=>{let t=(0,_.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=iT(),{addNewEnumeration:s,removeEnumeration:c}=Cr(IT),l=n[k],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,Ow(l[d])??``,[...r,{type:k,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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[k]).map(e=>{let t=[...r,{type:k,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(`div`,{className:`flex flex-1`,children:(0,w.jsx)(RC,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:xf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,w.jsx)(`tr`,{className:`w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(xL,{value:e,onChange:t=>{let a=n[k],s=fk(a,e,t),c={...n,[k]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(LL,{section:l[e]??Ow(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,w.jsx)(RC,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:_f,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},OL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[A];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:i[e]??Ow(i.true),keyPath:[...t,{type:A,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},kL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[B];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:i[e]??Ow(i.male),keyPath:[...t,{type:B,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},AL=e=>{let t=(0,_.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=iT(),{addNewElement:s,removeElement:c}=Cr(IT),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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,w.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,w.jsx)(RC,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:P,key:t}];o(i.localId,void 0,e)},Icon:xf,children:c.text})]})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:e??Ow(n[0]),keyPath:[...r,{type:P,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:P,key:n.length}];o(i.localId,Ow(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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,w.jsx)(RC,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:_f,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},jL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:N,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??Ow(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(LL,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),ML=e=>{let t=(0,_.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,h.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:R}],l=n[R];s=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(ZC,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(RL,{section:l,keyPath:c,dictionary:i,renderSection:a===1?zL:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},NL=e=>{let t=(0,_.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,h.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:L}],u=n[L],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,w.jsx)(yL,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(ZC,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(RL,{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},PL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:j}],i=e[j];return(0,w.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,w.jsx)(RL,{section:i,keyPath:r,...n})})},FL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:M}],i=e[M],{content:a}=e;return(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,w.jsx)(RL,{section:a,keyPath:r,...n})]})},IL=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=iT(),s=i[F],c=[...t,{type:F}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,w.jsx)(pk,{children:`Dictionary key`}),(0,w.jsx)(UO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,w.jsx)(pk,{children:`Path (optional)`}),(0,w.jsx)(UO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},LL=e=>{let t=(0,_.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=Cr(IT),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=Mw(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,w.jsx)(`span`,{children:`(React Node)`}),(0,w.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,w.jsx)(IL,{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,w.jsx)(EL,{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,w.jsx)(DL,{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,w.jsx)(OL,{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,w.jsx)(kL,{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,w.jsx)(PL,{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,w.jsx)(NL,{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,w.jsx)(ML,{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,w.jsx)(FL,{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,w.jsx)(AL,{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,w.jsx)(jL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(CL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,w.jsx)(SL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(TL,{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,w.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},RL=e=>(0,w.jsx)(NC,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,w.jsx)(LL,{...e})});function zL(e){return(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var BL={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`]},VL=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]||``,HL=Rd(`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`}}),UL=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=xe(BL).linkLabel;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_k,{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,w.jsx)(`span`,{itemProp:`name`,children:n})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},WL=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=Cr(BL);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,w.jsx)(`span`,{itemProp:`name`,children:t})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},GL=({children:e,position:t,className:n,...r})=>(0,w.jsxs)(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,w.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,w.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),KL=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,w.jsx)($d,{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,w.jsx)(`nav`,{"aria-label":o,children:(0,w.jsx)(`ol`,{className:G(HL({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,g=VL(n);if(p)return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,w.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:G(g),children:a})})]},`truncated-${m}`);let _=(0,w.jsx)(GL,{position:t+1,"aria-current":d,className:G(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?_=(0,w.jsx)(UL,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m):l&&(_=(0,w.jsx)(WL,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m));let v=(0,h.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},_);return o?v:(0,w.jsxs)(h.Fragment,{children:[v,(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:G(g),children:a})})]},m)})})})},qL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,w.jsx)(KL,{links:[...a?[{text:yr(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}),JL={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`]},YL=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});YL.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,w.jsx)(RC,{className:G([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),YL.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,...c})=>(0,w.jsx)(`div`,{className:G(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,w.jsx)(zC,{isHidden:t,className:G(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`),...c,children:e})});function XL(e){return Array.isArray?Array.isArray(e):oR(e)===`[object Array]`}function ZL(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 QL(e){return e==null?``:ZL(e)}function $L(e){return typeof e==`string`}function eR(e){return typeof e==`number`}function tR(e){return e===!0||e===!1||rR(e)&&oR(e)==`[object Boolean]`}function nR(e){return typeof e==`object`}function rR(e){return nR(e)&&e!==null}function iR(e){return e!=null}function aR(e){return!e.trim().length}function oR(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var sR=`Incorrect 'index' type`,cR=e=>`Invalid value for key ${e}`,lR=e=>`Pattern length exceeds max of ${e}.`,uR=e=>`Missing ${e} property in key`,dR=e=>`Property 'weight' in key '${e}' must be a positive integer`,fR=Object.prototype.hasOwnProperty,pR=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=mR(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 mR(e){let t=null,n=null,r=null,i=1,a=null;if($L(e)||XL(e))r=e,t=hR(e),n=gR(e);else{if(!fR.call(e,`name`))throw Error(uR(`name`));let o=e.name;if(r=o,fR.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(dR(o));t=hR(o),n=gR(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function hR(e){return XL(e)?e:e.split(`.`)}function gR(e){return XL(e)?e.join(`.`):e}function _R(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(iR(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!iR(s))return;if(a===t.length-1&&($L(s)||eR(s)||tR(s)||typeof s==`bigint`))n.push(o===void 0?QL(s):{v:QL(s),i:o});else if(XL(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,$L(t)?t.split(`.`):t,0),r?n:n[0]}var vR={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},yR={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},bR={location:0,threshold:.6,distance:100},xR={useExtendedSearch:!1,useTokenSearch:!1,getFn:_R,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...yR,...vR,...bR,...xR}),SR=/[^ ]+/g;function CR(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(SR).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 wR=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=CR(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,$L(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();$L(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(!iR(e)||aR(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(iR(i)){if(XL(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(iR(n)){if($L(n)){if(!aR(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(iR(n.v)){let t=$L(n.v)?n.v:QL(n.v);if(!aR(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if($L(i)&&!aR(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 TR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new wR({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(mR)),i.setSources(t),i.create(),i}function ER(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new wR({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function DR(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 OR=32;function kR(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>OR)throw Error(lR(OR));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=DR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function AR(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 jR(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 MR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},NR=RegExp(`[`+Object.keys(MR).join(``)+`]`,`g`),PR=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(NR,e=>MR[e]):e=>e,FR=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?PR(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:AR(e),startIndex:t})},d=this.pattern.length;if(d>OR){let e=0,t=d%OR,n=d-t;for(;e<n;)u(this.pattern.substr(e,OR),e),e+=OR;if(t){let e=d-OR;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?PR(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}=kR(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=jR(u)),p}},IR=class{constructor(e){this.pattern=e}static isMultiMatch(e){return LR(e,this.multiRegex)}static isSingleMatch(e){return LR(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function LR(e,t){let n=e.match(t);return n?n[1]:null}var RR=class extends IR{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]}}},zR=class extends IR{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]}}},BR=class extends IR{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]}}},VR=class extends IR{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]}}},HR=class extends IR{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]}}},UR=class extends IR{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]}}},WR=class extends IR{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 FR(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)}},GR=class extends IR{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}}},KR=[RR,GR,BR,VR,UR,HR,zR,WR],qR=KR.length,JR=`\0`,YR=`|`;function XR(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 ZR(e,t={}){return e.replace(/\\\|/g,JR).split(YR).map(e=>{let n=XR(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<qR;){let e=KR[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<qR;){let e=KR[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var QR=new Set([WR.type,GR.type]),$R=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?PR(e):e,this.pattern=e,this.query=ZR(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?PR(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&&(QR.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=jR(o)),e}}return{isMatch:!1,score:1}}},ez=[];function tz(...e){ez.push(...e)}function nz(e,t){for(let n=0,r=ez.length;n<r;n+=1){let r=ez[n];if(r.condition(e,t))return new r(e,t)}return new FR(e,t)}var rz={AND:`$and`,OR:`$or`},iz={PATH:`$path`,PATTERN:`$val`},az=e=>!!(e[rz.AND]||e[rz.OR]),oz=e=>!!e[iz.PATH],sz=e=>!XL(e)&&nR(e)&&!az(e),cz=e=>({[rz.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function lz(e,t,{auto:n=!0}={}){let r=e=>{if($L(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=nz(e,t)),r}let i=Object.keys(e),a=oz(e);if(!a&&i.length>1&&!az(e))return r(cz(e));if(sz(e)){let r=a?e[iz.PATH]:i[0],o=a?e[iz.PATTERN]:e[r];if(!$L(o))throw Error(cR(r));let s={keyId:gR(r),pattern:o};return n&&(s.searcher=nz(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];XL(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return az(e)||(e=cz(e)),r(e)}function uz(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 dz(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=uz(e.matches,{ignoreFieldNorm:t})})}var fz=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 pz(e,t){let n=e.matches;t.matches=[],iR(n)&&n.forEach(e=>{if(!iR(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 mz(e,t){t.score=e.score}function hz(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(pz),r&&i.push(mz),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var gz=/\b\w+\b/g;function _z({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=PR(n)),n.match(gz)||[]}}}function vz(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 yz(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 bz(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 xz=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new pR(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=nz(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 wR))throw Error(sR);if(this._myIndex=t||TR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=_z({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=vz(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(iR(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=_z({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});yz(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)bz(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&&bz(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($L(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return eR(n)&&n>-1&&(e=e.slice(0,n)),e}let c=eR(n)&&n>0&&$L(e),l;if(c){let t=new fz(n);$L(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=$L(e)?$L(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),dz(l,{ignoreFieldNorm:s}),a&&l.sort(o),eR(n)&&n>-1&&(l=l.slice(0,n));return hz(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(!iR(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=uz(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=lz(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===rz.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(iR(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(!iR(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=uz(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!iR(t))return[];let r=[];if(XL(t))t.forEach(({v:t,i,n:a})=>{if(!iR(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}},Sz=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=_z({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 FR(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=jR(t)),o}};xz.version=`7.3.0`,xz.createIndex=TR,xz.parseIndex=ER,xz.config=Y,xz.match=function(e,t,n){return nz(e,{...Y,...n}).searchIn(t)},xz.parseQuery=lz,tz($R),tz(Sz),xz.use=function(...e){e.forEach(e=>tz(e))};var Cz=`locale-switcher-content`,wz=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=Cr(JL),s=(0,h.useRef)(null),{locale:c}=wr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=VO(),f=(0,h.useMemo)(()=>l.map(e=>({locale:e,englishName:pr(e,`en`),currentLocaleName:pr(e,c),ownLocaleName:pr(e)})),[l,c]),[p,m]=(0,h.useState)(``),[g,_]=zO(`locale-content-selector-see-all-locales`,!1),v=(0,h.useMemo)(()=>new xz(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,h.useMemo)(()=>p?v.search(p).map(e=>e.item):f,[p,f,v]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{_(e),d(e?l:[c])};return(0,w.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,w.jsxs)(YL,{identifier:Cz,children:[(0,w.jsx)(YL.Trigger,{identifier:Cz,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,w.jsx)(`div`,{className:`px-2 py-1`,children:(0,w.jsx)(uf,{size:16})}),(0,w.jsx)(mf,{className:`self-center`,size:16})]})}),(0,w.jsx)(YL.Panel,{identifier:Cz,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,w.jsxs)(NC,{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,w.jsx)(`div`,{className:`m-auto p-2`,children:(0,w.jsx)(ZC,{defaultValue:g,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&g)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`p-3`,children:(0,w.jsx)(hT,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,w.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:y.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,w.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,w.jsx)(RC,{onClick:()=>b(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,w.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,w.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,w.jsx)(Zd,{className:`size-full`})}),(0,w.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,w.jsx)(`span`,{dir:cr(e),lang:e,children:i}),(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},Tz=e=>{let t=kw(e),n=Mw(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?Tz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},Ez=e=>{let t=(0,_.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=v,o=Ew(n,r,Zw()),{addEditedContent:s}=rT(),{setFocusedContentKeyPath:c,focusedContent:l}=$w(),{addNewElement:u,goToField:d}=Cr(IT),f=Mw(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&hr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=Tz(o);if(!o)return(0,w.jsx)(w.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,w.jsx)(RC,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:$d,children:yr(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,w.jsx)(w.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,w.jsx)(Ez,{keyPath:[...r,{type:O,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,w.jsx)(Ez,{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:P,key:t}];return Tz(e)?(0,w.jsxs)(RC,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:$d,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,w.jsx)(BC,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Ez,{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,w.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,w.jsx)(RC,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:P,key:o.length}],t=o,n=Ow(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:_f,children:u.text})]})}return typeof o.nodeType==`string`?(0,w.jsx)(Ez,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,w.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:N,key:e}];return Tz(Ew(n,t))?(0,w.jsx)(RC,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:$d,children:yr(e)},e):(0,w.jsx)(BC,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:yr(e),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Ez,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,w.jsxs)(w.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},Dz=e=>{let t=(0,_.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=iT(),{focusedContent:c,setFocusedContentKeyPath:l}=$w(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=Zw(),p=Ew(d,u??[],f),m;t[0]===d?m=t[1]:(m=Tz(d),t[0]=d,t[1]=m);let g=m,v=Tz(p),y;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2],(0,h.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},y),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,w.jsx)(qL,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,w.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,w.jsx)(wz,{})})]}),(0,w.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!g&&Object.keys(d).length>0&&(0,w.jsx)(NC,{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:`xl`,transparency:`xs`,children:(0,w.jsx)(Ez,{keyPath:[],section:d,dictionary:n})}),(v||(u??[]).length>0)&&(0,w.jsx)(RL,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},Oz=Rd(`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`}}),kz=({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,w.jsxs)(p,{className:G(Oz({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,w.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,w.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,w.jsx)(`title`,{children:`Remove badge`}),(0,w.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`})]})})]})},Az=`Dialog`,[jz,Mz]=Xl(Az),[Nz,Pz]=jz(Az),Fz=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=h.useRef(null),c=h.useRef(null),[l,u]=Pu({prop:r,defaultProp:i??!1,onChange:a,caller:Az});return(0,w.jsx)(Nz,{scope:t,triggerRef:s,contentRef:c,contentId:bA(),titleId:bA(),descriptionId:bA(),open:l,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Fz.displayName=Az;var Iz=`DialogTrigger`,Lz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Iz,n),a=Jl(t,i.triggerRef);return(0,w.jsx)(ou.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rB(i.open),...r,ref:a,onClick:Gl(e.onClick,i.onOpenToggle)})});Lz.displayName=Iz;var Rz=`DialogPortal`,[zz,Bz]=jz(Rz,{forceMount:void 0}),Vz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Pz(Rz,t);return(0,w.jsx)(zz,{scope:t,forceMount:n,children:h.Children.map(r,e=>(0,w.jsx)(ku,{present:n||a.open,children:(0,w.jsx)(Du,{asChild:!0,container:i,children:e})}))})};Vz.displayName=Rz;var Hz=`DialogOverlay`,Uz=h.forwardRef((e,t)=>{let n=Bz(Hz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Pz(Hz,e.__scopeDialog);return a.modal?(0,w.jsx)(ku,{present:r||a.open,children:(0,w.jsx)(Gz,{...i,ref:t})}):null});Uz.displayName=Hz;var Wz=Ql(`DialogOverlay.RemoveScroll`),Gz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Hz,n);return(0,w.jsx)(CP,{as:Wz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,w.jsx)(ou.div,{"data-state":rB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Kz=`DialogContent`,qz=h.forwardRef((e,t)=>{let n=Bz(Kz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Pz(Kz,e.__scopeDialog);return(0,w.jsx)(ku,{present:r||a.open,children:a.modal?(0,w.jsx)(Jz,{...i,ref:t}):(0,w.jsx)(Yz,{...i,ref:t})})});qz.displayName=Kz;var Jz=h.forwardRef((e,t)=>{let n=Pz(Kz,e.__scopeDialog),r=h.useRef(null),i=Jl(t,n.contentRef,r);return h.useEffect(()=>{let e=r.current;if(e)return mN(e)},[]),(0,w.jsx)(Xz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gl(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Gl(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Gl(e.onFocusOutside,e=>e.preventDefault())})}),Yz=h.forwardRef((e,t)=>{let n=Pz(Kz,e.__scopeDialog),r=h.useRef(!1),i=h.useRef(!1);return(0,w.jsx)(Xz,{...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()}})}),Xz=h.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Pz(Kz,n),c=h.useRef(null),l=Jl(t,c);return eA(),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(oA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(gu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":rB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(sB,{titleId:s.titleId}),(0,w.jsx)(lB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Zz=`DialogTitle`,Qz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Zz,n);return(0,w.jsx)(ou.h2,{id:i.titleId,...r,ref:t})});Qz.displayName=Zz;var $z=`DialogDescription`,eB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz($z,n);return(0,w.jsx)(ou.p,{id:i.descriptionId,...r,ref:t})});eB.displayName=$z;var tB=`DialogClose`,nB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(tB,n);return(0,w.jsx)(ou.button,{type:`button`,...r,ref:t,onClick:Gl(e.onClick,()=>i.onOpenChange(!1))})});nB.displayName=tB;function rB(e){return e?`open`:`closed`}var iB=`DialogTitleWarning`,[aB,oB]=Yl(iB,{contentName:Kz,titleName:Zz,docsSlug:`dialog`}),sB=({titleId:e})=>{let t=oB(iB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
116
|
+
`)?e.slice(0,-1):e,[e]),[D,O]=(0,h.useState)(E);(0,h.useEffect)(()=>{if(!y||S===`typescript`){O(E);return}let e=!1;return(async()=>{let{transformCode:t}=await Pn(async()=>{let{transformCode:e}=await import(`./codeTransformer-C1hlgQJh.js`);return{transformCode:e}},[]);e||O(t(E,S))})(),()=>{e=!0}},[E,y,S]);let k=s||c||l;return(0,w.jsx)(Jk,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,w.jsxs)(NC,{className:G(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...d,children:[r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,w.jsx)(`span`,{className:`truncate`,children:C??t}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,w.jsx)(yI,{}),c&&(0,w.jsx)(cI,{availableFormats:x}),l&&(0,w.jsx)(lI,{})]})]}),(0,w.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,w.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`,k&&`h-11`),children:(0,w.jsx)(vI,{code:D})})})]}),(0,w.jsx)(Vk,{minHeight:bI,isRollable:u,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:y?(0,w.jsx)(Kk,{originalLang:t,targetFormat:S,isDarkMode:n,children:E}):(0,w.jsx)(Wk,{lang:t,isDarkMode:n,children:E})})]})})},wI=(0,h.createContext)({tabsValues:{},setTabsValues:()=>{}}),TI=()=>(0,h.useContext)(wI),EI=e=>{let t=(0,_.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,h.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,w.jsx)(wI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},DI=e=>{let t=(0,_.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,h.useRef)(null),[g,v]=(0,h.useState)(!1),[y,b]=(0,h.useState)(0),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=x):x=t[0];let S=(0,h.useRef)(x),C=(0,h.useRef)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=w):w=t[1];let T=w,E;t[2]!==o||t[3]!==a?(E=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=E):E=t[4];let D=E,O;t[5]===u?O=t[6]:(O=e=>{u&&S.current.pointerId===null&&(S.current.pointerId=e.pointerId,S.current.startX=e.clientX,S.current.startY=e.clientY,S.current.lastX=e.clientX,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current=!1,v(!1),b(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==g?(A=e=>{if(!u||S.current.pointerId!==e.pointerId)return;let t=T();if(!t)return;let n=e.clientX-S.current.startX,r=e.clientY-S.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){C.current=!0;return}}if(!S.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(S.current.axisLocked=!0,S.current.isHorizontal=e>t)}if(S.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),g||v(!0),b(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=g,t[11]=A):A=t[11];let j=A,M;t[12]!==y||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=y;if(v(!1),b(0),S.current.pointerId=null,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current){C.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=y,t[13]=r,t[14]=i,t[15]=d,t[16]=M):M=t[16];let N=M,P;t[17]!==u||t[18]!==N?(P=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[17]=u,t[18]=N,t[19]=P):P=t[19];let F=P,I;t[20]!==u||t[21]!==N?(I=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=I):I=t[22];let L=I,R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{b(0),v(!1)},t[23]=R):R=t[23];let ee;t[24]===a?ee=t[25]:(ee=[a],t[24]=a,t[25]=ee),(0,h.useEffect)(R,ee);let te;t[26]===f?te=t[27]:(te={touchAction:f},t[26]=f,t[27]=te);let z;t[28]!==L||t[29]!==k||t[30]!==j||t[31]!==F||t[32]!==te?(z={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:F,onPointerCancel:L,style:te},t[28]=L,t[29]=k,t[30]=j,t[31]=F,t[32]=te,t[33]=z):z=t[33];let B;return t[34]!==y||t[35]!==g||t[36]!==z?(B={containerRef:m,isDragging:g,dragDeltaPct:y,containerProps:z},t[34]=y,t[35]=g,t[36]=z,t[37]=B):B=t[37],B},OI=Rd(`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`}}),kI=Rd(`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`}}),AI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,h.useRef)([]),c=(0,h.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=WC(s,{isHoverable:i,orientation:a});return(0,h.useEffect)(()=>{u()},[t]),(0,w.jsxs)(`div`,{className:G(OI({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,h.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,w.jsx)(`div`,{className:G(kI({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},jI=(0,h.createContext)(void 0),MI=Rd(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),NI=({children:e,...t})=>(0,w.jsx)(`div`,{...t,children:e});NI.displayName=`TabItem`;var PI=Object.assign(e=>{let t=(0,_.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=h.Children.toArray(a).filter(FI),d=u[0]?.props?.value,{tabsValues:f,setTabsValues:p}=TI(),[m,g]=(0,h.useState)(n??d??``),v=(r&&typeof f==`object`?f?.[r]:m)??n??d,y;t[0]===v?y=t[1]:(y=e=>e.props.value===v,t[0]=v,t[1]=y);let b=u.findIndex(y),x=u.length,{containerProps:S,dragDeltaPct:C,isDragging:T}=DI({itemIndex:b,itemCount:x,onSwipeLeft:()=>{let e=u[Math.min(x-1,b+1)]?.props?.value;e&&E(e)},onSwipeRight:()=>{let e=u[Math.max(0,b-1)]?.props?.value;e&&E(e)}}),E=e=>{g(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},D={activeTab:m??d??``,setActiveTab:E},O;return t[2]!==b||t[3]!==c?(O=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===b;return(0,w.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:G(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,w.jsx)(`div`,{className:G(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=b,t[3]=c,t[4]=O):O=t[4],(0,w.jsx)(jI.Provider,{value:D,children:(0,w.jsxs)(`div`,{className:G(MI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,w.jsx)(`div`,{className:G(`flex shrink-0 gap-3 p-3`,s),children:(0,w.jsx)(AI,{selectedChoice:v,tabs:u.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=v===n;return(0,w.jsx)(`button`,{className:G(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&E(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,w.jsx)(`div`,{className:G(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...S,children:(0,w.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:G(`grid w-full min-w-0`,c&&`h-full`,T?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${b*100-(T?C:0)}%)`},children:u.map(O)})})]})})},{Item:NI});function FI(e){return(0,h.isValidElement)(e)&&e.type===NI}var II=e=>{let t=(0,_.c)(3),[n,r]=(0,h.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,h.useEffect)(i,a),n},LI=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()})}},RI=[],zI=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(LI.subscribe,LI.getSnapshot,BI),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:LI.addBlockage,removeBlockage:LI.removeBlockage,isElementScrollBlocked:LI.isElementScrollBlocked},e[0]=t,e[1]=n),n};function BI(){return RI}var VI=e=>{let t=(0,_.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}=zI(),d=II(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,h.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 g;return t[12]===m?g=t[13]:(g={isScrollBlocked:m},t[12]=m,t[13]=g),g},HI=Rd(`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`}}),UI={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`},WI=EC.create(NC),GI=e=>{let t=(0,_.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,g=c===void 0?`md`:c,v=u===void 0?!1:u,y=d===void 0?!0:d,b=f===void 0?`none`:f,x=II(i),S=r&&y,C;t[0]===S?C=t[1]:(C={key:`modal`,disableScroll:S},t[0]=S,t[1]=C),VI(C);let T,E;if(t[2]!==r||t[3]!==a?(T=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},E=[r,a],t[2]=r,t[3]=a,t[4]=T,t[5]=E):(T=t[4],E=t[5]),(0,h.useEffect)(T,E),!x){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[6]=e):e=t[6],e}let D=!!s,O=UI[b||`none`],k;return t[7]===a?k=t[8]:(k=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=k),(0,au.createPortal)((0,w.jsx)(EC.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:k,"aria-hidden":!r,children:(0,w.jsxs)(WI,{onClick:KI,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:HI({size:g,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,w.jsxs)(`div`,{className:G(`relative flex-none px-4 pt-4`,m&&D?`flex items-start`:m?`flex justify-end`:D?`items-center`:`hidden`),children:[D&&(0,w.jsx)(Mk,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Cf,size:`icon-md`})]}),(0,w.jsx)(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,v===!0&&`overflow-auto`,v===`y`&&`overflow-y-auto overflow-x-hidden`,v===`x`&&`overflow-x-auto overflow-y-hidden`,!v&&`overflow-visible`),children:(0,w.jsx)(`div`,{className:G(`flex h-full w-full flex-1 flex-col`,O),children:n})})]})}),x)};function KI(e){return e.stopPropagation()}var qI={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},JI=e=>{let t=(0,_.c)(6),{setIsModalOpen:n}=e,{modal:r}=Cr(qI),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,w.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,w.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,w.jsxs)(hI,{identifier:`expand`,children:[(0,w.jsx)(RC,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:ff}),(0,w.jsxs)(hI.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,w.jsx)(`strong`,{children:r.title}),(0,w.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},YI=(0,h.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,w.jsx)(`table`,{ref:r,className:G(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),XI=.55,ZI=5,QI=30,$I=(e,t,n)=>{let r=(0,_.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(QI,Math.max(ZI,(n[t]??0)*XI));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${QI}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,h.useEffect)(i,n)},eL=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null);$I(u,d,[a.children,o]),(0,h.useEffect)(()=>{if(o&&c!==null&&d.current){let e=d.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,h.useEffect)(()=>{o||l(null)},[o]);let f=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(l(t.rowIndex),s(!0))}i?.(e)};return(0,w.jsxs)(`div`,{className:`group relative`,children:[n&&(0,w.jsx)(JI,{setIsModalOpen:s}),(0,w.jsx)(Vk,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,w.jsx)(YI,{ref:u,className:e,isInteractive:r??n,onClick:f,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f(e)},...a})}),(0,w.jsx)(GI,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,w.jsx)(`div`,{className:`grid`,children:(0,w.jsx)(YI,{ref:d,className:G(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,w.jsx)(w.Fragment,{})})]})};function tL(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var nL=e=>{let t=(0,_.c)(2),{src:n,className:r,title:i,...a}=e,[o,s]=(0,h.useState)(!1),{href:c,label:l}=tL(n),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>s(!0),t[0]=u):u=t[0];let d;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>s(!1),t[1]=d):d=t[1],(0,w.jsxs)(NC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,w.jsx)(`iframe`,{...a,src:n,title:i,className:G(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-neutral/30 border-t bg-card/40 px-3 py-1`,children:[c?(0,w.jsx)(_k,{href:c,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-neutral text-xs underline-offset-2 hover:text-text hover:underline`,children:l}):(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,w.jsx)(RC,{variant:`hoverable`,size:`icon-md`,onClick:u,label:`Open embedded page in fullscreen`,Icon:ff})]}),(0,w.jsx)(GI,{isOpen:o,onClose:d,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&n?(0,w.jsx)(NC,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,w.jsx)(`iframe`,{...a,src:n,title:i??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},rL=e=>(0,w.jsx)(Ak,{isClickable:!0,className:`text-text`,...e}),iL=e=>(0,w.jsx)(jk,{isClickable:!0,className:`mt-16 text-text`,...e}),aL=e=>(0,w.jsx)(Mk,{isClickable:!0,className:`mt-5 text-text`,...e}),oL=e=>(0,w.jsx)(Nk,{isClickable:!0,className:`mt-3 text-text`,...e}),sL=e=>(0,w.jsx)(Pk,{isClickable:!0,className:`mt-3 text-text`,...e}),cL=e=>(0,w.jsx)(Fk,{isClickable:!0,className:`mt-3 text-text`,...e}),lL=e=>(0,w.jsx)(`strong`,{className:`text-text`,...e}),uL=(0,h.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,w.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,w.jsx)(CI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),dL=e=>function(t){return(0,w.jsx)(uL,{...t,isDarkMode:e})},fL=({className:e,...t})=>(0,w.jsx)(`blockquote`,{className:G(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),pL=({className:e,...t})=>(0,w.jsx)(`ul`,{className:G(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),mL=({className:e,...t})=>(0,w.jsx)(`ol`,{className:G(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),hL=({className:e,alt:t,src:n,...r})=>(0,w.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:G(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),gL=e=>t=>(0,w.jsx)(_k,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),_L={h1:rL,h2:iL,h3:aL,h4:oL,h5:sL,h6:cL,strong:lL,blockquote:fL,ul:pL,ol:mL,img:hL,pre:e=>(0,w.jsx)(w.Fragment,{children:e.children}),table:e=>(0,w.jsx)(eL,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,w.jsx)(`th`,{className:G(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,w.jsx)(`tr`,{className:G(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,w.jsx)(`td`,{className:G(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,w.jsx)(`hr`,{className:G(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,w.jsx)(PI,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:PI.Item,Columns:({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`flex-1`,e),...t}),iframe:e=>(0,w.jsx)(nL,{...e})},vL=(e,t)=>({..._L,code:dL(e),a:gL(t)}),yL=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,w.jsx)(Rk,{children:(0,w.jsx)(EI,{children:Dr(e,{components:{...vL(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),bL=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}},xL=e=>{let t=(0,_.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=bL(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,h.useState)(a??null),[l,u]=(0,h.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,h.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,w.jsxs)(`div`,{className:`flex gap-1`,children:[(0,w.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,w.jsx)(J.Trigger,{className:`w-20`,children:(0,w.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`<`,children:`<`}),(0,w.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,w.jsx)(J.Item,{value:`=`,children:`=`}),(0,w.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,w.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,w.jsx)(hT,{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},SL=e=>{let t=(0,_.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=iT(),s=nT(),{mutate:c,isPending:l}=UO(),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,w.jsx)(lk,{variant:`default`,onContentChange:u,additionalButtons:(0,w.jsx)(RC,{Icon:Sf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},CL=e=>{let t=(0,_.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=iT(),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,w.jsx)(VT,{variant:`default`,onContentChange:o,...i})},wL=[{content:`False`,value:!1},{content:`True`,value:!0}],TL=e=>{let t=(0,_.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=iT(),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,w.jsx)(ZC,{choices:wL,value:!0,onChange:o,color:`text`,size:`sm`,...i})},EL=e=>{let t=(0,_.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=wr(),{selectedLocales:c,availableLocales:l}=zT(),u=n[O],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[O],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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:pr(e,o)})}),(0,w.jsx)(`tr`,{className:`flex`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:p[e]??Ow(p[s]),keyPath:[...r,{type:O,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,w.jsx)(`table`,{className:`w-full`,children:(0,w.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},DL=e=>{let t=(0,_.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=iT(),{addNewEnumeration:s,removeEnumeration:c}=Cr(IT),l=n[k],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,Ow(l[d])??``,[...r,{type:k,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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[k]).map(e=>{let t=[...r,{type:k,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(`div`,{className:`flex flex-1`,children:(0,w.jsx)(RC,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:xf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,w.jsx)(`tr`,{className:`w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(xL,{value:e,onChange:t=>{let a=n[k],s=fk(a,e,t),c={...n,[k]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(LL,{section:l[e]??Ow(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,w.jsx)(RC,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:_f,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},OL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[A];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:i[e]??Ow(i.true),keyPath:[...t,{type:A,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},kL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[B];return(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:i[e]??Ow(i.male),keyPath:[...t,{type:B,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},AL=e=>{let t=(0,_.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=iT(),{addNewElement:s,removeElement:c}=Cr(IT),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,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,w.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,w.jsx)(RC,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:P,key:t}];o(i.localId,void 0,e)},Icon:xf,children:c.text})]})})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(RL,{section:e??Ow(n[0]),keyPath:[...r,{type:P,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:P,key:n.length}];o(i.localId,Ow(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,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,w.jsx)(RC,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:_f,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},jL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(`table`,{className:`w-full`,children:(0,w.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:N,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??Ow(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,w.jsx)(`tr`,{className:`block w-full`,children:(0,w.jsx)(`td`,{className:`flex w-full`,children:(0,w.jsx)(LL,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),ML=e=>{let t=(0,_.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,h.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:R}],l=n[R];s=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(ZC,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(RL,{section:l,keyPath:c,dictionary:i,renderSection:a===1?zL:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},NL=e=>{let t=(0,_.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,h.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:L}],u=n[L],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,w.jsx)(yL,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsx)(ZC,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,w.jsx)(RL,{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},PL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:j}],i=e[j];return(0,w.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,w.jsx)(RL,{section:i,keyPath:r,...n})})},FL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:M}],i=e[M],{content:a}=e;return(0,w.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,w.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,w.jsx)(RL,{section:a,keyPath:r,...n})]})},IL=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=iT(),s=i[F],c=[...t,{type:F}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,w.jsx)(pk,{children:`Dictionary key`}),(0,w.jsx)(VT,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,w.jsx)(pk,{children:`Path (optional)`}),(0,w.jsx)(VT,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},LL=e=>{let t=(0,_.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=Cr(IT),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=Mw(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,w.jsx)(`span`,{children:`(React Node)`}),(0,w.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,w.jsx)(IL,{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,w.jsx)(EL,{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,w.jsx)(DL,{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,w.jsx)(OL,{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,w.jsx)(kL,{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,w.jsx)(PL,{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,w.jsx)(NL,{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,w.jsx)(ML,{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,w.jsx)(FL,{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,w.jsx)(AL,{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,w.jsx)(jL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(CL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,w.jsx)(SL,{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,w.jsx)(`div`,{className:`w-full p-2`,children:(0,w.jsx)(TL,{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,w.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},RL=e=>(0,w.jsx)(NC,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,w.jsx)(LL,{...e})});function zL(e){return(0,w.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var BL={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`]},VL=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]||``,HL=Rd(`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`}}),UL=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=xe(BL).linkLabel;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_k,{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,w.jsx)(`span`,{itemProp:`name`,children:n})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},WL=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=Cr(BL);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(RC,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,w.jsx)(`span`,{itemProp:`name`,children:t})}),(0,w.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},GL=({children:e,position:t,className:n,...r})=>(0,w.jsxs)(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,w.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,w.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),KL=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,w.jsx)($d,{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,w.jsx)(`nav`,{"aria-label":o,children:(0,w.jsx)(`ol`,{className:G(HL({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,g=VL(n);if(p)return(0,w.jsxs)(h.Fragment,{children:[(0,w.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,w.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:G(g),children:a})})]},`truncated-${m}`);let _=(0,w.jsx)(GL,{position:t+1,"aria-current":d,className:G(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?_=(0,w.jsx)(UL,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m):l&&(_=(0,w.jsx)(WL,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m));let v=(0,h.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},_);return o?v:(0,w.jsxs)(h.Fragment,{children:[v,(0,w.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,w.jsx)(`span`,{className:G(g),children:a})})]},m)})})})},qL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,w.jsx)(KL,{links:[...a?[{text:yr(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}),JL={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`]},YL=({children:e,className:t,identifier:n,...r})=>(0,w.jsx)(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});YL.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,w.jsx)(RC,{className:G([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),YL.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,...c})=>(0,w.jsx)(`div`,{className:G(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,w.jsx)(zC,{isHidden:t,className:G(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`),...c,children:e})});function XL(e){return Array.isArray?Array.isArray(e):oR(e)===`[object Array]`}function ZL(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 QL(e){return e==null?``:ZL(e)}function $L(e){return typeof e==`string`}function eR(e){return typeof e==`number`}function tR(e){return e===!0||e===!1||rR(e)&&oR(e)==`[object Boolean]`}function nR(e){return typeof e==`object`}function rR(e){return nR(e)&&e!==null}function iR(e){return e!=null}function aR(e){return!e.trim().length}function oR(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var sR=`Incorrect 'index' type`,cR=e=>`Invalid value for key ${e}`,lR=e=>`Pattern length exceeds max of ${e}.`,uR=e=>`Missing ${e} property in key`,dR=e=>`Property 'weight' in key '${e}' must be a positive integer`,fR=Object.prototype.hasOwnProperty,pR=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=mR(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 mR(e){let t=null,n=null,r=null,i=1,a=null;if($L(e)||XL(e))r=e,t=hR(e),n=gR(e);else{if(!fR.call(e,`name`))throw Error(uR(`name`));let o=e.name;if(r=o,fR.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(dR(o));t=hR(o),n=gR(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function hR(e){return XL(e)?e:e.split(`.`)}function gR(e){return XL(e)?e.join(`.`):e}function _R(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(iR(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!iR(s))return;if(a===t.length-1&&($L(s)||eR(s)||tR(s)||typeof s==`bigint`))n.push(o===void 0?QL(s):{v:QL(s),i:o});else if(XL(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,$L(t)?t.split(`.`):t,0),r?n:n[0]}var vR={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},yR={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},bR={location:0,threshold:.6,distance:100},xR={useExtendedSearch:!1,useTokenSearch:!1,getFn:_R,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...yR,...vR,...bR,...xR}),SR=/[^ ]+/g;function CR(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(SR).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 wR=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=CR(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,$L(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();$L(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(!iR(e)||aR(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(iR(i)){if(XL(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(iR(n)){if($L(n)){if(!aR(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(iR(n.v)){let t=$L(n.v)?n.v:QL(n.v);if(!aR(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if($L(i)&&!aR(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 TR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new wR({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(mR)),i.setSources(t),i.create(),i}function ER(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new wR({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function DR(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 OR=32;function kR(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>OR)throw Error(lR(OR));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=DR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function AR(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 jR(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 MR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},NR=RegExp(`[`+Object.keys(MR).join(``)+`]`,`g`),PR=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(NR,e=>MR[e]):e=>e,FR=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?PR(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:AR(e),startIndex:t})},d=this.pattern.length;if(d>OR){let e=0,t=d%OR,n=d-t;for(;e<n;)u(this.pattern.substr(e,OR),e),e+=OR;if(t){let e=d-OR;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?PR(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}=kR(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=jR(u)),p}},IR=class{constructor(e){this.pattern=e}static isMultiMatch(e){return LR(e,this.multiRegex)}static isSingleMatch(e){return LR(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function LR(e,t){let n=e.match(t);return n?n[1]:null}var RR=class extends IR{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]}}},zR=class extends IR{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]}}},BR=class extends IR{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]}}},VR=class extends IR{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]}}},HR=class extends IR{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]}}},UR=class extends IR{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]}}},WR=class extends IR{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 FR(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)}},GR=class extends IR{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}}},KR=[RR,GR,BR,VR,UR,HR,zR,WR],qR=KR.length,JR=`\0`,YR=`|`;function XR(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 ZR(e,t={}){return e.replace(/\\\|/g,JR).split(YR).map(e=>{let n=XR(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<qR;){let e=KR[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<qR;){let e=KR[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var QR=new Set([WR.type,GR.type]),$R=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?PR(e):e,this.pattern=e,this.query=ZR(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?PR(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&&(QR.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=jR(o)),e}}return{isMatch:!1,score:1}}},ez=[];function tz(...e){ez.push(...e)}function nz(e,t){for(let n=0,r=ez.length;n<r;n+=1){let r=ez[n];if(r.condition(e,t))return new r(e,t)}return new FR(e,t)}var rz={AND:`$and`,OR:`$or`},iz={PATH:`$path`,PATTERN:`$val`},az=e=>!!(e[rz.AND]||e[rz.OR]),oz=e=>!!e[iz.PATH],sz=e=>!XL(e)&&nR(e)&&!az(e),cz=e=>({[rz.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function lz(e,t,{auto:n=!0}={}){let r=e=>{if($L(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=nz(e,t)),r}let i=Object.keys(e),a=oz(e);if(!a&&i.length>1&&!az(e))return r(cz(e));if(sz(e)){let r=a?e[iz.PATH]:i[0],o=a?e[iz.PATTERN]:e[r];if(!$L(o))throw Error(cR(r));let s={keyId:gR(r),pattern:o};return n&&(s.searcher=nz(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];XL(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return az(e)||(e=cz(e)),r(e)}function uz(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 dz(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=uz(e.matches,{ignoreFieldNorm:t})})}var fz=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 pz(e,t){let n=e.matches;t.matches=[],iR(n)&&n.forEach(e=>{if(!iR(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 mz(e,t){t.score=e.score}function hz(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(pz),r&&i.push(mz),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var gz=/\b\w+\b/g;function _z({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=PR(n)),n.match(gz)||[]}}}function vz(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 yz(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 bz(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 xz=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new pR(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=nz(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 wR))throw Error(sR);if(this._myIndex=t||TR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=_z({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=vz(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(iR(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=_z({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});yz(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)bz(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&&bz(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($L(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return eR(n)&&n>-1&&(e=e.slice(0,n)),e}let c=eR(n)&&n>0&&$L(e),l;if(c){let t=new fz(n);$L(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=$L(e)?$L(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),dz(l,{ignoreFieldNorm:s}),a&&l.sort(o),eR(n)&&n>-1&&(l=l.slice(0,n));return hz(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(!iR(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=uz(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=lz(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===rz.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(iR(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(!iR(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=uz(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!iR(t))return[];let r=[];if(XL(t))t.forEach(({v:t,i,n:a})=>{if(!iR(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}},Sz=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=_z({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 FR(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=jR(t)),o}};xz.version=`7.3.0`,xz.createIndex=TR,xz.parseIndex=ER,xz.config=Y,xz.match=function(e,t,n){return nz(e,{...Y,...n}).searchIn(t)},xz.parseQuery=lz,tz($R),tz(Sz),xz.use=function(...e){e.forEach(e=>tz(e))};var Cz=`locale-switcher-content`,wz=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=Cr(JL),s=(0,h.useRef)(null),{locale:c}=wr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=zT(),f=(0,h.useMemo)(()=>l.map(e=>({locale:e,englishName:pr(e,`en`),currentLocaleName:pr(e,c),ownLocaleName:pr(e)})),[l,c]),[p,m]=(0,h.useState)(``),[g,_]=LT(`locale-content-selector-see-all-locales`,!1),v=(0,h.useMemo)(()=>new xz(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,h.useMemo)(()=>p?v.search(p).map(e=>e.item):f,[p,f,v]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{_(e),d(e?l:[c])};return(0,w.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,w.jsxs)(YL,{identifier:Cz,children:[(0,w.jsx)(YL.Trigger,{identifier:Cz,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,w.jsx)(`div`,{className:`px-2 py-1`,children:(0,w.jsx)(uf,{size:16})}),(0,w.jsx)(mf,{className:`self-center`,size:16})]})}),(0,w.jsx)(YL.Panel,{identifier:Cz,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,w.jsxs)(NC,{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,w.jsx)(`div`,{className:`m-auto p-2`,children:(0,w.jsx)(ZC,{defaultValue:g,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&g)&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`p-3`,children:(0,w.jsx)(hT,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,w.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:y.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,w.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,w.jsx)(RC,{onClick:()=>b(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,w.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,w.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,w.jsx)(Zd,{className:`size-full`})}),(0,w.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,w.jsx)(`span`,{dir:cr(e),lang:e,children:i}),(0,w.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,w.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},Tz=e=>{let t=kw(e),n=Mw(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?Tz(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},Ez=e=>{let t=(0,_.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=v,o=Ew(n,r,Zw()),{addEditedContent:s}=rT(),{setFocusedContentKeyPath:c,focusedContent:l}=$w(),{addNewElement:u,goToField:d}=Cr(IT),f=Mw(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&hr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=Tz(o);if(!o)return(0,w.jsx)(w.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,w.jsx)(RC,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:$d,children:yr(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,w.jsx)(w.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,w.jsx)(Ez,{keyPath:[...r,{type:O,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,w.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,w.jsx)(Ez,{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:P,key:t}];return Tz(e)?(0,w.jsxs)(RC,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:$d,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,w.jsx)(BC,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Ez,{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,w.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,w.jsx)(RC,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:P,key:o.length}],t=o,n=Ow(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:_f,children:u.text})]})}return typeof o.nodeType==`string`?(0,w.jsx)(Ez,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,w.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:N,key:e}];return Tz(Ew(n,t))?(0,w.jsx)(RC,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:$d,children:yr(e)},e):(0,w.jsx)(BC,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:yr(e),children:(0,w.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,w.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,w.jsx)(Ez,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,w.jsxs)(w.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},Dz=e=>{let t=(0,_.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=iT(),{focusedContent:c,setFocusedContentKeyPath:l}=$w(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=Zw(),p=Ew(d,u??[],f),m;t[0]===d?m=t[1]:(m=Tz(d),t[0]=d,t[1]=m);let g=m,v=Tz(p),y;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2],(0,h.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},y),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,w.jsx)(qL,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,w.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,w.jsx)(wz,{})})]}),(0,w.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!g&&Object.keys(d).length>0&&(0,w.jsx)(NC,{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:`xl`,transparency:`xs`,children:(0,w.jsx)(Ez,{keyPath:[],section:d,dictionary:n})}),(v||(u??[]).length>0)&&(0,w.jsx)(RL,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},Oz=Rd(`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`}}),kz=({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,w.jsxs)(p,{className:G(Oz({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,w.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,w.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,w.jsx)(`title`,{children:`Remove badge`}),(0,w.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`})]})})]})},Az=`Dialog`,[jz,Mz]=Xl(Az),[Nz,Pz]=jz(Az),Fz=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=h.useRef(null),c=h.useRef(null),[l,u]=Pu({prop:r,defaultProp:i??!1,onChange:a,caller:Az});return(0,w.jsx)(Nz,{scope:t,triggerRef:s,contentRef:c,contentId:bA(),titleId:bA(),descriptionId:bA(),open:l,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Fz.displayName=Az;var Iz=`DialogTrigger`,Lz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Iz,n),a=Jl(t,i.triggerRef);return(0,w.jsx)(ou.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rB(i.open),...r,ref:a,onClick:Gl(e.onClick,i.onOpenToggle)})});Lz.displayName=Iz;var Rz=`DialogPortal`,[zz,Bz]=jz(Rz,{forceMount:void 0}),Vz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Pz(Rz,t);return(0,w.jsx)(zz,{scope:t,forceMount:n,children:h.Children.map(r,e=>(0,w.jsx)(ku,{present:n||a.open,children:(0,w.jsx)(Du,{asChild:!0,container:i,children:e})}))})};Vz.displayName=Rz;var Hz=`DialogOverlay`,Uz=h.forwardRef((e,t)=>{let n=Bz(Hz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Pz(Hz,e.__scopeDialog);return a.modal?(0,w.jsx)(ku,{present:r||a.open,children:(0,w.jsx)(Gz,{...i,ref:t})}):null});Uz.displayName=Hz;var Wz=Ql(`DialogOverlay.RemoveScroll`),Gz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Hz,n);return(0,w.jsx)(CP,{as:Wz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,w.jsx)(ou.div,{"data-state":rB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Kz=`DialogContent`,qz=h.forwardRef((e,t)=>{let n=Bz(Kz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Pz(Kz,e.__scopeDialog);return(0,w.jsx)(ku,{present:r||a.open,children:a.modal?(0,w.jsx)(Jz,{...i,ref:t}):(0,w.jsx)(Yz,{...i,ref:t})})});qz.displayName=Kz;var Jz=h.forwardRef((e,t)=>{let n=Pz(Kz,e.__scopeDialog),r=h.useRef(null),i=Jl(t,n.contentRef,r);return h.useEffect(()=>{let e=r.current;if(e)return mN(e)},[]),(0,w.jsx)(Xz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gl(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Gl(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Gl(e.onFocusOutside,e=>e.preventDefault())})}),Yz=h.forwardRef((e,t)=>{let n=Pz(Kz,e.__scopeDialog),r=h.useRef(!1),i=h.useRef(!1);return(0,w.jsx)(Xz,{...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()}})}),Xz=h.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Pz(Kz,n),c=h.useRef(null),l=Jl(t,c);return eA(),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(oA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(gu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":rB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(sB,{titleId:s.titleId}),(0,w.jsx)(lB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Zz=`DialogTitle`,Qz=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(Zz,n);return(0,w.jsx)(ou.h2,{id:i.titleId,...r,ref:t})});Qz.displayName=Zz;var $z=`DialogDescription`,eB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz($z,n);return(0,w.jsx)(ou.p,{id:i.descriptionId,...r,ref:t})});eB.displayName=$z;var tB=`DialogClose`,nB=h.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Pz(tB,n);return(0,w.jsx)(ou.button,{type:`button`,...r,ref:t,onClick:Gl(e.onClick,()=>i.onOpenChange(!1))})});nB.displayName=tB;function rB(e){return e?`open`:`closed`}var iB=`DialogTitleWarning`,[aB,oB]=Yl(iB,{contentName:Kz,titleName:Zz,docsSlug:`dialog`}),sB=({titleId:e})=>{let t=oB(iB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
117
117
|
|
|
118
118
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
119
119
|
|
|
@@ -174,5 +174,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
174
174
|
--nojs-bg: black !important;
|
|
175
175
|
--nojs-fg: white !important;
|
|
176
176
|
}
|
|
177
|
-
}`,_J=18,vJ=40,yJ=`${vJ}px`,bJ=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),xJ=e=>{let t=(0,_.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(!1),[u,d]=(0,h.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-_J,f=c;document.querySelectorAll(bJ).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,g,v;t[5]!==n||t[6]!==i?(g=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=vJ)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},v=[n,i],t[5]=n,t[6]=i,t[7]=g,t[8]=v):(g=t[7],v=t[8]),(0,h.useEffect)(g,v);let y;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(y=()=>{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]=y):y=t[13];let b;t[14]!==r||t[15]!==a||t[16]!==i?(b=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=b):b=t[17],(0,h.useEffect)(y,b);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:yJ},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},SJ=e=>{let t=(0,h.useRef)(void 0);return(0,h.useEffect)(()=>{t.current=e}),t.current},CJ=(0,h.createContext)({}),wJ=({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=gJ,render:f,children:p,...m})=>{let[g,_]=(0,h.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),v=e??g,y=SJ(v),b=e=>{t?.(e),_(e)},x=r===void 0?null:typeof r==`string`?new RegExp(r):r,S=(0,h.useRef)(null),C=(0,h.useRef)(null),T=(0,h.useRef)({value:v,onChange:b,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),E=(0,h.useRef)({prev:[S.current?.selectionStart??null,S.current?.selectionEnd??null,S.current?.selectionDirection??`none`]});(0,h.useEffect)(()=>{let e=S.current,t=C.current;if(!e||!t)return;T.current.value!==e.value&&T.current.onChange(e.value),E.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=E.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&&S.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),E.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;`;hJ(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),hJ(e.sheet,`[data-input-otp]:autofill { ${t} }`),hJ(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),hJ(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; } }`),hJ(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[D,O]=(0,h.useState)(!1),[k,A]=(0,h.useState)(!1),[j,M]=(0,h.useState)(null),[N,P]=(0,h.useState)(null),[F,I]=(0,h.useState)(null);(0,h.useEffect)(()=>{mJ(()=>{S.current?.dispatchEvent(new Event(`input`));let e=S.current?.selectionStart??null,t=S.current?.selectionEnd??null,n=S.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),E.current.prev=[e,t,n])})},[v,k]),(0,h.useEffect)(()=>{y!==void 0&&v!==y&&y.length<n&&v.length===n&&o?.(v)},[n,o,y,v]);let L=(0,h.useRef)(null);(0,h.useEffect)(()=>{let e=k&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[k,F,s]);let R=xJ({containerRef:C,inputRef:S,pushPasswordManagerStrategy:c,isFocused:k}),ee=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&x&&!x.test(t)){e.preventDefault();return}typeof y==`string`&&t.length<y.length&&document.dispatchEvent(new Event(`selectionchange`)),b(t)},te=()=>{if(S.current){let e=Math.min(S.current.value.length,n-1),t=S.current.value.length;S.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},z=e=>{let t=S.current;if(!l&&(!T.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=S.current?.selectionStart,o=S.current?.selectionEnd,s=(a===o?v.slice(0,a??0)+i+v.slice(a??0):v.slice(0,a??0)+i+v.slice(o??0)).slice(0,n);if(!(s.length>0&&x&&!x.test(s))&&t){t.value=s,b(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},B={width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},V=(0,w.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":v.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:x?.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:B,maxLength:n,value:v,ref:S,onPaste:e=>{z(e),m.onPaste?.(e)},onChange:ee,onMouseOver:e=>{O(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{O(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=S.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{te(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ne={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=v[t]===void 0?null:v[t];return{char:r,placeholderChar:v[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&D,setSelection:e=>{let t=S.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=v[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},re=f===void 0?(0,w.jsx)(CJ.Provider,{value:ne,children:p}):f(ne);return(0,w.jsxs)(w.Fragment,{children:[d!==null&&(0,w.jsx)(`noscript`,{children:(0,w.jsx)(`style`,{children:d})}),(0,w.jsxs)(`div`,{ref:C,className:G(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[re,(0,w.jsx)(`div`,{className:`absolute inset-0`,children:V})]})]})},TJ=({className:e,render:t,...n})=>(0,w.jsx)(wJ,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:G(`disabled:cursor-not-allowed`,e),render:t,...n}),EJ=({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`z-10 flex items-center gap-3`,e),...t}),DJ=e=>{let t=(0,_.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,h.useContext)(CJ),{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 g=m;return(0,w.jsx)(RC,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:G(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:g,label:null,...o,children:(0,w.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},OJ=e=>(0,w.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,w.jsx)(df,{})}),kJ=e=>(0,w.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}),AJ=e=>e?.getAttribute(`aria-selected`)===`true`,jJ=({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}=eJ(),f=(0,h.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=WC(f,{selector:AJ,isHoverable:!0});return(0,h.useEffect)(()=>{m()},[]),(0,w.jsx)(aJ,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,w.jsx)(TJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(EJ,{children:[(0,w.jsx)(DJ,{index:0,ref:e=>{f.current[0]=e}}),(0,w.jsx)(DJ,{index:1,ref:e=>{f.current[1]=e}}),(0,w.jsx)(DJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,w.jsx)(OJ,{}),(0,w.jsxs)(EJ,{children:[(0,w.jsx)(DJ,{index:3,ref:e=>{f.current[3]=e}}),(0,w.jsx)(DJ,{index:4,ref:e=>{f.current[4]=e}}),(0,w.jsx)(DJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,w.jsx)(kJ,{style:p})]})})})},MJ=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}=SH();return(0,w.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,w.jsx)(jJ,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},NJ=({className:e,...t})=>(0,w.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,w.jsx)(bf,{className:`absolute left-2 size-4`}),(0,w.jsx)(hT,{...t,type:`search`,className:G(`pl-8`,e)})]}),PJ=e=>(0,w.jsx)(sJ,{id:e.name,"data-testid":e.name,Element:NJ,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),FJ=e=>(0,w.jsx)(sJ,{Element:gT,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}),IJ=e=>(0,w.jsx)(sJ,{Element:yT,id:e.name,"data-testid":e.name,...e}),LJ=Rd([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`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:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),RJ=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,w.jsx)(`input`,{type:`checkbox`,className:G(LJ({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),zJ=e=>{let{label:t,name:n,id:r}=e;return t?(0,w.jsxs)(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,w.jsx)(RJ,{id:r??n,...e}),t]}):(0,w.jsx)(RJ,{id:r??n,...e})},BJ=({inputLabel:e,value:t,onChange:n,...r})=>(0,w.jsx)(zJ,{...r,label:e,checked:!!t,onChange:n}),VJ=({autoComplete:e,...t})=>(0,w.jsx)(sJ,{Element:BJ,id:t.name,"data-testid":t.name,autoComplete:e,...t}),HJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(zV,{onValueChange:t.onChange,values:t.value,...l,children:c})})},UJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(HJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},WJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},GJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(WJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},KJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(ZC,{...t,...l,children:c})})},qJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(KJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},JJ=e=>{let t=(0,_.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=eJ(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,w.jsx)(PB,{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},YJ=e=>{let t=(0,_.c)(3),{formDescriptionId:n}=eJ(),r;return t[0]!==n||t[1]!==e?(r=(0,w.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},XJ=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=eJ(),a=r?String(r?.message??``):t;return a?(0,w.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=Jq;$.Description=YJ,$.Control=JJ,$.Field=$q,$.Item=Xq,$.Label=iJ,$.Message=XJ,$.Element=sJ,$.Input=uJ,$.InputPassword=pJ,$.Checkbox=VJ,$.TextArea=FJ,$.AutoSizedTextArea=IJ,$.Button=RC,$.Select=GJ,$.MultiSelect=UJ,$.EditableFieldInput=cJ,$.EditableFieldTextArea=lJ,$.SwitchSelector=qJ,$.OTP=MJ,$.SearchInput=PJ;var ZJ=Z(`ZodISODateTime`,(e,t)=>{DG.init(e,t),CY.init(e,t)});function QJ(e){return qK(ZJ,e)}var $J=Z(`ZodISODate`,(e,t)=>{OG.init(e,t),CY.init(e,t)});function eY(e){return JK($J,e)}var tY=Z(`ZodISOTime`,(e,t)=>{kG.init(e,t),CY.init(e,t)});function nY(e){return YK(tY,e)}var rY=Z(`ZodISODuration`,(e,t)=>{AG.init(e,t),CY.init(e,t)});function iY(e){return XK(rY,e)}var aY=(e,t)=>{oW.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>lW(e,t)},flatten:{value:t=>cW(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,DU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,DU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,aY);var oY=Z(`ZodError`,aY,{Parent:Error}),sY=uW(oY),cY=fW(oY),lY=mW(oY),uY=gW(oY),dY=vW(oY),fY=yW(oY),pY=bW(oY),mY=xW(oY),hY=SW(oY),gY=CW(oY),_Y=wW(oY),vY=TW(oY),yY=Z(`ZodType`,(e,t)=>(pG.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:wq(e,`input`),output:wq(e,`output`)}}),e.toJSONSchema=Cq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(PU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>WU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>sY(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lY(e,t,n),e.parseAsync=async(t,n)=>cY(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>uY(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>dY(e,t,n),e.decode=(t,n)=>fY(e,t,n),e.encodeAsync=async(t,n)=>pY(e,t,n),e.decodeAsync=async(t,n)=>mY(e,t,n),e.safeEncode=(t,n)=>hY(e,t,n),e.safeDecode=(t,n)=>gY(e,t,n),e.safeEncodeAsync=async(t,n)=>_Y(e,t,n),e.safeDecodeAsync=async(t,n)=>vY(e,t,n),e.refine=(t,n)=>e.check(wX(t,n)),e.superRefine=t=>e.check(TX(t)),e.overwrite=t=>e.check(cq(t)),e.optional=()=>oX(e),e.exactOptional=()=>cX(e),e.nullable=()=>uX(e),e.nullish=()=>oX(uX(e)),e.nonoptional=t=>gX(e,t),e.array=()=>JY(e),e.or=t=>QY([e,t]),e.and=t=>eX(e,t),e.transform=t=>bX(e,iX(t)),e.default=t=>fX(e,t),e.prefault=t=>mX(e,t),e.catch=t=>vX(e,t),e.pipe=t=>bX(e,t),e.readonly=()=>SX(e),e.describe=t=>{let n=e.clone();return CK.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return CK.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return CK.get(e);let n=e.clone();return CK.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bY=Z(`_ZodString`,(e,t)=>{mG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(nq(...t)),e.includes=(...t)=>e.check(aq(...t)),e.startsWith=(...t)=>e.check(oq(...t)),e.endsWith=(...t)=>e.check(sq(...t)),e.min=(...t)=>e.check(eq(...t)),e.max=(...t)=>e.check($K(...t)),e.length=(...t)=>e.check(tq(...t)),e.nonempty=(...t)=>e.check(eq(1,...t)),e.lowercase=t=>e.check(rq(t)),e.uppercase=t=>e.check(iq(t)),e.trim=()=>e.check(uq()),e.normalize=(...t)=>e.check(lq(...t)),e.toLowerCase=()=>e.check(dq()),e.toUpperCase=()=>e.check(fq()),e.slugify=()=>e.check(pq())}),xY=Z(`ZodString`,(e,t)=>{mG.init(e,t),bY.init(e,t),e.email=t=>e.check(TK(wY,t)),e.url=t=>e.check(jK(DY,t)),e.jwt=t=>e.check(KK(HY,t)),e.emoji=t=>e.check(MK(OY,t)),e.guid=t=>e.check(EK(TY,t)),e.uuid=t=>e.check(DK(EY,t)),e.uuidv4=t=>e.check(OK(EY,t)),e.uuidv6=t=>e.check(kK(EY,t)),e.uuidv7=t=>e.check(AK(EY,t)),e.nanoid=t=>e.check(NK(kY,t)),e.guid=t=>e.check(EK(TY,t)),e.cuid=t=>e.check(PK(AY,t)),e.cuid2=t=>e.check(FK(jY,t)),e.ulid=t=>e.check(IK(MY,t)),e.base64=t=>e.check(UK(zY,t)),e.base64url=t=>e.check(WK(BY,t)),e.xid=t=>e.check(LK(NY,t)),e.ksuid=t=>e.check(RK(PY,t)),e.ipv4=t=>e.check(zK(FY,t)),e.ipv6=t=>e.check(BK(IY,t)),e.cidrv4=t=>e.check(VK(LY,t)),e.cidrv6=t=>e.check(HK(RY,t)),e.e164=t=>e.check(GK(VY,t)),e.datetime=t=>e.check(QJ(t)),e.date=t=>e.check(eY(t)),e.time=t=>e.check(nY(t)),e.duration=t=>e.check(iY(t))});function SY(e){return wK(xY,e)}var CY=Z(`ZodStringFormat`,(e,t)=>{hG.init(e,t),bY.init(e,t)}),wY=Z(`ZodEmail`,(e,t)=>{vG.init(e,t),CY.init(e,t)}),TY=Z(`ZodGUID`,(e,t)=>{gG.init(e,t),CY.init(e,t)}),EY=Z(`ZodUUID`,(e,t)=>{_G.init(e,t),CY.init(e,t)}),DY=Z(`ZodURL`,(e,t)=>{yG.init(e,t),CY.init(e,t)}),OY=Z(`ZodEmoji`,(e,t)=>{bG.init(e,t),CY.init(e,t)}),kY=Z(`ZodNanoID`,(e,t)=>{xG.init(e,t),CY.init(e,t)}),AY=Z(`ZodCUID`,(e,t)=>{SG.init(e,t),CY.init(e,t)}),jY=Z(`ZodCUID2`,(e,t)=>{CG.init(e,t),CY.init(e,t)}),MY=Z(`ZodULID`,(e,t)=>{wG.init(e,t),CY.init(e,t)}),NY=Z(`ZodXID`,(e,t)=>{TG.init(e,t),CY.init(e,t)}),PY=Z(`ZodKSUID`,(e,t)=>{EG.init(e,t),CY.init(e,t)}),FY=Z(`ZodIPv4`,(e,t)=>{jG.init(e,t),CY.init(e,t)}),IY=Z(`ZodIPv6`,(e,t)=>{MG.init(e,t),CY.init(e,t)}),LY=Z(`ZodCIDRv4`,(e,t)=>{NG.init(e,t),CY.init(e,t)}),RY=Z(`ZodCIDRv6`,(e,t)=>{PG.init(e,t),CY.init(e,t)}),zY=Z(`ZodBase64`,(e,t)=>{IG.init(e,t),CY.init(e,t)}),BY=Z(`ZodBase64URL`,(e,t)=>{RG.init(e,t),CY.init(e,t)}),VY=Z(`ZodE164`,(e,t)=>{zG.init(e,t),CY.init(e,t)}),HY=Z(`ZodJWT`,(e,t)=>{VG.init(e,t),CY.init(e,t)}),UY=Z(`ZodUnknown`,(e,t)=>{HG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function WY(){return ZK(UY)}var GY=Z(`ZodNever`,(e,t)=>{UG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dq(e,t,n,r)});function KY(e){return QK(GY,e)}var qY=Z(`ZodArray`,(e,t)=>{GG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(eq(t,n)),e.nonempty=t=>e.check(eq(1,t)),e.max=(t,n)=>e.check($K(t,n)),e.length=(t,n)=>e.check(tq(t,n)),e.unwrap=()=>e.element});function JY(e,t){return mq(qY,e,t)}var YY=Z(`ZodObject`,(e,t)=>{XG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mq(e,t,n,r),MU(e,`shape`,()=>t.shape),e.keyof=()=>nX(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:WY()}),e.loose=()=>e.clone({...e._zod.def,catchall:WY()}),e.strict=()=>e.clone({...e._zod.def,catchall:KY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>JU(e,t),e.safeExtend=t=>YU(e,t),e.merge=t=>XU(e,t),e.pick=t=>KU(e,t),e.omit=t=>qU(e,t),e.partial=(...t)=>ZU(aX,e,t[0]),e.required=(...t)=>QU(hX,e,t[0])});function XY(e,t){return new YY({type:`object`,shape:e??{},...Q(t)})}var ZY=Z(`ZodUnion`,(e,t)=>{QG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nq(e,t,n,r),e.options=t.options});function QY(e,t){return new ZY({type:`union`,options:e,...Q(t)})}var $Y=Z(`ZodIntersection`,(e,t)=>{$G.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pq(e,t,n,r)});function eX(e,t){return new $Y({type:`intersection`,left:e,right:t})}var tX=Z(`ZodEnum`,(e,t)=>{nK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oq(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 tX({...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 tX({...t,checks:[],...Q(r),entries:i})}});function nX(e,t){return new tX({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var rX=Z(`ZodTransform`,(e,t)=>{rK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new CU(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(iW(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(iW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function iX(e){return new rX({type:`transform`,transform:e})}var aX=Z(`ZodOptional`,(e,t)=>{aK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oX(e){return new aX({type:`optional`,innerType:e})}var sX=Z(`ZodExactOptional`,(e,t)=>{oK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cX(e){return new sX({type:`optional`,innerType:e})}var lX=Z(`ZodNullable`,(e,t)=>{sK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uX(e){return new lX({type:`nullable`,innerType:e})}var dX=Z(`ZodDefault`,(e,t)=>{cK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fX(e,t){return new dX({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}var pX=Z(`ZodPrefault`,(e,t)=>{uK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mX(e,t){return new pX({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}var hX=Z(`ZodNonOptional`,(e,t)=>{dK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gX(e,t){return new hX({type:`nonoptional`,innerType:e,...Q(t)})}var _X=Z(`ZodCatch`,(e,t)=>{pK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vX(e,t){return new _X({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var yX=Z(`ZodPipe`,(e,t)=>{mK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bq(e,t,n,r),e.in=t.in,e.out=t.out});function bX(e,t){return new yX({type:`pipe`,in:e,out:t})}var xX=Z(`ZodReadonly`,(e,t)=>{gK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SX(e){return new xX({type:`readonly`,innerType:e})}var CX=Z(`ZodCustom`,(e,t)=>{vK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kq(e,t,n,r)});function wX(e,t={}){return hq(CX,e,t)}function TX(e){return gq(e)}var EX={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`]},DX=e=>{let t=(0,_.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,h.useState)(!1),{setLocaleDictionary:u}=Xw(),{mutate:d,isPending:f}=NO(),{mutate:p,isPending:m}=RO(),{mutate:g,isPending:v}=MO(),y=m||v,{editedContent:b,restoreEditedContent:x}=iT(),{deleteButton:S,resetButton:C,saveButton:T,publishButton:E,downloadButton:D,confirmation:O}=Cr(EX),{isAuthenticated:k}=TO(),A=b?.[n.localId],j;t[0]!==n||t[1]!==A?(j=A&&JSON.stringify(A)!==JSON.stringify(n),t[0]=n,t[1]=A,t[2]=j):j=t[2];let M=j,N=n?.id!==void 0,P;t[3]!==n||t[4]!==b||t[5]!==o||t[6]!==x||t[7]!==u||t[8]!==p?(P=async()=>{b?.[n.localId]&&p({dictionary:{...n,...b?.[n.localId]}},{onSuccess:()=>{u(b?.[n.localId]),x(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=b,t[5]=o,t[6]=x,t[7]=u,t[8]=p,t[9]=P):P=t[9];let F=P,I;t[10]!==n||t[11]!==b||t[12]!==o||t[13]!==g||t[14]!==x||t[15]!==u?(I=()=>{let e={...n,...b?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),x(n.localId),o?.())}})},t[10]=n,t[11]=b,t[12]=o,t[13]=g,t[14]=x,t[15]=u,t[16]=I):I=t[16];let L=I,R;t[17]!==d||t[18]!==n||t[19]!==a?(R=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=R):R=t[20];let ee=R,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let z;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>l(!1),t[22]=z):z=t[22],(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(GI,{isOpen:c,title:O.title.value,size:`md`,onClose:te,padding:`md`,children:(0,w.jsxs)(`form`,{className:`size-full`,children:[(0,w.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:O.message}),(0,w.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,w.jsx)($.Button,{label:O.cancelButton.label.value,disabled:!M||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:z,children:O.cancelButton.text}),(0,w.jsx)($.Button,{label:O.confirmButton.label.value,disabled:!M||y,Icon:yf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:F,children:O.confirmButton.text})]})]})}),(0,w.jsxs)(`form`,{className:G(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&N&&a&&k&&(0,w.jsx)($.Button,{label:S.label.value,Icon:xf,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:S.text}),M&&(0,w.jsx)($.Button,{label:C.label.value,disabled:!M,Icon:vf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>x(n.localId),children:C.text}),r.includes(`local`)&&(0,w.jsx)($.Button,{label:D.label.value,disabled:!M||y,Icon:of,color:`text`,variant:k?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:D.text}),r.includes(`remote`)&&k&&!N&&(0,w.jsx)($.Button,{label:E.label.value,disabled:y,Icon:Xd,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:L,children:E.text}),r.includes(`remote`)&&k&&N&&M&&(0,w.jsx)($.Button,{label:T.label.value,disabled:!M||y,Icon:yf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:L,children:T.text})]})]})},OX={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`]},kX=(e,t=2e3,n,r)=>{let[i,a]=(0,h.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))}}}},AX=e=>{let t=(0,_.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,v=d===void 0?!0:d,y=f===void 0?!0:f,b=p===void 0?14:p,{isCopied:x,copy:S}=kX(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,w.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let C;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==S||t[8]!==x||t[9]!==v||t[10]!==b||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),S()},o=x?h:m,s=x?rf:af;C=(0,w.jsxs)(`span`,{className:G(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":x,"data-testid":`copy-to-clipboard`,children:[(0,w.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,w.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:b,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=S,t[8]=x,t[9]=v,t[10]=b,t[11]=y,t[12]=n,t[13]=C}else C=t[13];return C},jX={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`]},MX={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`]},NX=e=>{let t=(0,_.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:v}=Cr(MX),y;if(t[0]!==u||t[1]!==l||t[2]!==v||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 _;t[18]!==r||t[19]!==n?(_=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=_):_=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]!==v||t[36]!==g?(T=e=>e.input===void 0?g.value:v.value,t[35]=v,t[36]=g,t[37]=T):T=t[37],y=XY({title:SY({error:_}).refine(PX,{error:i.value}).optional(),key:SY({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:SY({error:x}).optional(),projectIds:JY(SY({error:S})).default([e]),tags:JY(SY({error:C})).default([]),location:nX([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:nX([`static`,`dynamic`,`fetch`]).optional(),filePath:SY({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=v,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]=y}else y=t[17];return y};function PX(e){return e.length===0||e.length>=4}var FX=e=>{let t=(0,_.c)(55),{dictionary:n,mode:r}=e,{session:i}=wO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=jO(),{data:l}=PO(),u=s?.data??[],d=l?.data??[],f=NX(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:g,isSubmitting:v}=Yq(f,m),{editedContent:y,setEditedDictionary:b}=iT(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:T,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=Cr(jX),{mutate:j,isPending:M}=FO(),N=y?.[n.localId],P;t[5]!==n||t[6]!==g?(P=()=>{g.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=g,t[7]=P):P=t[7];let F=g?.reset,I;t[8]!==n||t[9]!==F?(I=[n,F],t[8]=n,t[9]=F,t[10]=I):I=t[10],(0,h.useEffect)(P,I);let L;t[11]!==n||t[12]!==g||t[13]!==N?(L=()=>{N===void 0&&g.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=g,t[13]=N,t[14]=L):L=t[14];let R;t[15]===N?R=t[16]:(R=[N],t[15]=N,t[16]=R),(0,h.useEffect)(L,R);let ee;t[17]!==j||t[18]!==n||t[19]!==g||t[20]!==b||t[21]!==N?(ee=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;b(t=>({...t,...e,...n})),g.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=g,t[20]=b,t[21]=N,t[22]=ee):ee=t[22];let te=ee,z;t[23]===g.control?z=t[24]:(z={control:g.control,name:`location`},t[23]=g.control,t[24]=z);let B=vH(z),V=B===`local`||B===`hybrid`,ne;t[25]!==n||t[26]!==g||t[27]!==b?(ne=e=>{g.setValue(`key`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=g,t[27]=b,t[28]=ne):ne=t[28];let re;t[29]!==n||t[30]!==g||t[31]!==b?(re=e=>{g.setValue(`title`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=g,t[31]=b,t[32]=re):re=t[32];let ie;t[33]!==n||t[34]!==g||t[35]!==b?(ie=e=>{g.setValue(`description`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=g,t[35]=b,t[36]=ie):ie=t[36];let ae;t[37]!==n||t[38]!==g||t[39]!==D||t[40]!==r||t[41]!==b?(ae=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?g.getValues(`filePath`)??n.filePath:void 0;e||g.setValue(`filePath`,void 0),b(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),b(e=>({...n,...e??{},location:r}))};return(0,w.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,w.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,w.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,w.jsx)(zJ,{id:`location-local`,name:`location-local`,label:D.local.value,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,w.jsx)(zJ,{id:`location-remote`,name:`location-remote`,label:D.remote.value,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,w.jsx)($.Description,{children:D.testDescription}),(0,w.jsx)($.Message,{})]})},t[37]=n,t[38]=g,t[39]=D,t[40]=r,t[41]=b,t[42]=ae):ae=t[42];let oe;t[43]!==n||t[44]!==g||t[45]!==b?(oe=e=>{g.setValue(`importMode`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=g,t[45]=b,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==g||t[49]!==b?(se=e=>{let t=[e].flat();g.setValue(`projectIds`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=g,t[49]=b,t[50]=se):se=t[50];let ce;return t[51]!==n||t[52]!==g||t[53]!==b?(ce=e=>{let t=[e].flat();g.setValue(`tags`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=g,t[53]=b,t[54]=ce):ce=t[54],(0,w.jsxs)($,{className:`flex w-full flex-col gap-8`,...g,schema:f,children:[(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:v,isRequired:!0,onSave:ne}),(0,w.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:v,onSave:re})]}),(0,w.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:v,onSave:ie}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,w.jsx)($.Field,{control:g.control,name:`location`,render:ae}),(0,w.jsx)(Ox,{mode:`wait`,children:V&&(0,w.jsx)(EC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,w.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:v||!V,onChange:e=>{let t=e.target.value;b(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,w.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,w.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:oe,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:O.label.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,w.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,w.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsxs)($.MultiSelect,{name:`projectIds`,label:T.label.value,description:T.description,onValueChange:se,children:[(0,w.jsx)(zV.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,w.jsx)(zV.Input,{placeholder:T.placeholder.value})}),(0,w.jsx)(zV.Content,{children:(0,w.jsx)(FC,{isLoading:c,children:(0,w.jsx)(zV.List,{children:u?.map(IX)})})})]}),(0,w.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:ce,children:[(0,w.jsx)(zV.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,w.jsx)(zV.Input,{placeholder:E.placeholder.value})}),(0,w.jsx)(zV.Content,{children:(0,w.jsx)(FC,{isLoading:c,children:(0,w.jsx)(zV.List,{children:d?.map(LX)})})})]})]}),(0,w.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,w.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Sf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:v||M,isLoading:M})})]})};function IX(e){return(0,w.jsx)(zV.Item,{value:String(e.id),children:e.name},String(e.id))}function LX(e){return(0,w.jsx)(zV.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var RX=(0,h.lazy)(()=>Pn(()=>import(`./dist-cfqsGm74.js`).then(e=>({default:e.Editor})),__vite__mapDeps([3,1]))),zX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,h.useRef)(null),c=(0,h.useRef)(null),[l,u]=(0,h.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(`
|
|
178
|
-
`).length>1:!1);return(0,w.jsxs)(`div`,{className:G(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,w.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,w.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,w.jsx)(_I,{content:e})})}),(0,w.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(FC,{}),children:(0,w.jsx)(RX,{...l,defaultLanguage:`typescript`,language:t,loading:(0,w.jsx)(FC,{}),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`})})})]})},BX=e=>{let t=(0,_.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=iT(),o=VX,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,w.jsx)(zX,{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 VX(e){try{return JSON.parse(e),!0}catch{return!1}}var HX={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`]},UX={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`,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`,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`,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`,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`,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:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,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`,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`,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:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},WX=e=>{let t=(0,_.c)(22),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,triggerPlaceHolder:d,nest:f,gender:p,condition:m,markdown:g,insertion:v,reactNode:y,file:b}=Cr(UX),x;t[0]===n?x=t[1]:(x=Mw(n),t[0]=n,t[1]=x);let[S,C]=(0,h.useState)(x),T;t[2]===r?T=t[3]:(T=e=>{C(e),r(e)},t[2]=r,t[3]=T);let E=T,D;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==b||t[9]!==p||t[10]!==v||t[11]!==S||t[12]!==g||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==y||t[19]!==a||t[20]!==d?(D=(0,w.jsxs)(J,{value:S,onValueChange:E,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:d})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:O,children:i}),(0,w.jsx)(J.Item,{value:ee,children:a}),(0,w.jsx)(J.Item,{value:te,children:o}),(0,w.jsx)(J.Item,{value:z,children:s}),(0,w.jsx)(J.Item,{value:N,children:c}),(0,w.jsx)(J.Item,{value:P,children:l}),(0,w.jsx)(J.Item,{value:k,children:u}),(0,w.jsx)(J.Item,{value:B,children:p}),(0,w.jsx)(J.Item,{value:j,children:v}),(0,w.jsx)(J.Item,{value:L,children:g}),(0,w.jsx)(J.Item,{value:F,children:f}),(0,w.jsx)(J.Item,{value:A,children:m}),(0,w.jsx)(J.Item,{value:I,disabled:!0,children:y}),(0,w.jsx)(J.Item,{value:M,children:b})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=b,t[9]=p,t[10]=v,t[11]=S,t[12]=g,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=y,t[19]=a,t[20]=d,t[21]=D):D=t[21],D},GX=e=>{let t=(0,_.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=nT()?.internationalization.locales??[],s=Mw(n),c=kw(n),l=e=>{a(Dw(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(WX,{section:n,onValueChange:e=>a(Dw(e,o))}),(0,w.jsx)(GX,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(WX,{section:n,onValueChange:e=>a(Dw(e,o))}),(0,w.jsx)(GX,{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(Dw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(WX,{section:n,onValueChange:s}),(0,w.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,w.jsx)(JX,{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(Dw(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,w.jsx)(WX,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},KX=e=>{let t=(0,_.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=$w(),{renameEditedContent:c,addEditedContent:l}=rT(),{titleInput:u,deleteButton:d}=Cr(HX),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,w.jsx)(NC,{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":hr(i,o?.keyPath??[]),onClick:e,children:(0,w.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,w.jsxs)(`div`,{className:`w-full`,children:[(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,w.jsx)(kT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,w.jsx)(RC,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:xf,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,w.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,yr(n),` )`]})]}),(0,w.jsx)(GX,{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},qX=e=>{let t=(0,_.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=Cr(HX),{setFocusedContentKeyPath:o}=$w(),{addEditedContent:s}=rT();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.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:N,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,w.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,w.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,w.jsx)(`li`,{className:`flex w-full`,children:(0,w.jsx)(KX,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:N,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,w.jsx)(RC,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:_f,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},JX=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,w.jsx)(KX,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,w.jsx)(qX,{section:e,keyPath:t,dictionaryLocalId:n}),YX=e=>{let t=(0,_.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=iT(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,w.jsx)(KX,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},XX=e=>{let t=(0,_.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=nT(),{returnToDictionaryList:d}=Cr(OX),{focusedContent:f,setFocusedContent:p}=$w(),{setLocaleDictionary:m}=Xw(),g;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(g=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=g):g=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,h.useEffect)(g,v);let y;if(t[6]!==u?.internationalization.locales||t[7]!==n||t[8]!==i||t[9]!==a||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==d||t[14]!==p||t[15]!==l){let e;t[17]!==o||t[18]!==p?(e=()=>{p(null),o?.()},t[17]=o,t[18]=p,t[19]=e):e=t[19],y=(0,w.jsx)(HO,{availableLocales:u?.internationalization.locales??[],children:(0,w.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,w.jsx)(RC,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:Yd,label:d.label.value,children:d.text}),(0,w.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,w.jsxs)(PI,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,w.jsx)(PI.Item,{label:`Details`,value:`details`,children:(0,w.jsx)(FX,{dictionary:n,mode:a})}),(0,w.jsx)(PI.Item,{label:`Structure`,value:`structure`,children:(0,w.jsx)(YX,{dictionary:n})}),(0,w.jsx)(PI.Item,{label:`Content`,value:`content`,children:(0,w.jsx)(Dz,{dictionary:n,isDarkMode:i})}),(0,w.jsx)(PI.Item,{label:`JSON`,value:`json`,children:(0,w.jsx)(BX,{dictionary:n,isDarkMode:i})})]})}),(0,w.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,w.jsx)(AX,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,w.jsx)(DX,{dictionary:n,mode:a,onDelete:e,onSave:s})]})]})}),t[6]=u?.internationalization.locales,t[7]=n,t[8]=i,t[9]=a,t[10]=r,t[11]=o,t[12]=s,t[13]=d,t[14]=p,t[15]=l,t[16]=y}else y=t[16];return y},ZX=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}},QX=()=>{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)},$X=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},eZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},tZ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},nZ=(e=`md`)=>{let t=ZX(e),n=QX(),r=tZ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:$X(),isMac:eZ()}},rZ=e=>{let t=(0,_.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=nZ(n),t[0]=n,t[1]=r);let[i,a]=(0,h.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(nZ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,h.useEffect)(o,s),i},iZ=e=>{let t=(0,_.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,h.useRef)(``),p=(0,h.useRef)(null),[m,g]=(0,h.useState)(o??``),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=v):v=t[2];let y=v,b;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(b=e=>{f.current=e;let t=d?e.trim():e;if(y(),t.length<l){g(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(g(e),s?.(e)):(g(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=b):b=t[8];let x=b,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,h.useEffect)(S,C);let w=m.length>=l,T;return t[11]!==m||t[12]!==x||t[13]!==w?(T={setSearch:x,search:m,hasMinChars:w},t[11]=m,t[12]=x,t[13]=w,t[14]=T):T=t[14],T},aZ=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()})}},oZ=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(aZ.subscribe,aZ.getSnapshot,sZ),n;return e[0]===t?n=e[1]:(n={open:aZ.open,close:aZ.close,set:aZ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function sZ(){return{}}var cZ={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`]},lZ=e=>e.split(` + `).map(e=>e.trim()),uZ=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,dZ=(e,t)=>{let n=t.map(uZ),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(uZ(e)));if(!i)return!1;let a=uZ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},fZ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,pZ=(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},mZ=e=>{let t=(0,_.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}=rZ(),f;t[0]!==d||t[1]!==n?(f=lZ(pZ(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[g,v]=(0,h.useState)(m),y,b;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(y=()=>{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(fZ(i))):a.add(i.toUpperCase()),v(a),!l&&r&&dZ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{v(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)}},b=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=y,t[9]=b):(y=t[8],b=t[9]),(0,h.useEffect)(y,b),!c)return null;let x;t[10]===g?x=t[11]:(x=e=>{let t=e.toUpperCase(),n=uZ(e);return g.has(e)||g.has(t)||g.has(n)||e===`⌘`&&g.has(`Meta`)||e===`Ctrl`&&g.has(`Control`)||e===`⌥`&&g.has(`Alt`)||e===`Alt`&&g.has(`Alt`)||e===`←`&&g.has(`ArrowLeft`)||e===`→`&&g.has(`ArrowRight`)||e===`↑`&&g.has(`ArrowUp`)||e===`↓`&&g.has(`ArrowDown`)},t[10]=g,t[11]=x);let S=x,C;if(t[12]!==o||t[13]!==S||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==S||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=fZ(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,w.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,w.jsx)(`span`,{className:G(`min-w-4 px-0.5 text-center`,S(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=S,t[19]=n,t[20]=e):e=t[20],C=(0,w.jsx)(`kbd`,{className:G(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=S,t[14]=p,t[15]=n,t[16]=u,t[17]=C}else C=t[17];return C},hZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,w.jsx)(`div`,{className:G(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,w.jsx)(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ml-auto`),children:e})}),gZ=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},_Z=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=Cr(cZ),{isMobile:d}=rZ(`md`),f=(0,h.useRef)(null),p=(0,h.useRef)(null),m=II(l),{open:g,close:_,isOpen:v}=oZ(),y=v(t),b=y;VI({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,h.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=gZ(f.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,_,c,a,t]);let x=(0,h.useRef)(c);return(0,h.useEffect)(()=>{x.current=c},[c]),(0,h.useEffect)(()=>{s!==void 0&&s!==y&&(s?g(t):(_(t),x.current?.()))},[s,y,t,g,_]),m?(0,au.createPortal)((0,w.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,w.jsx)(hZ,{isHidden:!b,align:`right`,children:(0,w.jsxs)(NC,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,w.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,w.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,w.jsx)(`div`,{children:o&&(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:ef,children:o?.text})}),(0,w.jsx)(`div`,{children:(0,w.jsxs)(hI,{identifier:`close-drawer`,children:[(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{_(t),c?.()},Icon:Cf,size:`icon-md`}),(0,w.jsx)(hI.Detail,{identifier:`close-drawer`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,w.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,w.jsx)(mZ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&(0,w.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,w.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,w.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(_(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,w.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,w.jsx)(w.Fragment,{})},vZ=Rd(`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`}}),yZ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,w.jsx)(`div`,{className:vZ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),bZ=`dictionaryList`,xZ=e=>`dictionary_edition_${e}`,SZ=e=>{let t=(0,_.c)(20),n;t[0]===e?n=t[1]:(n=xZ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=oZ(),{getEditedContentValue:s}=rT(),{focusedContent:c,setFocusedContent:l}=$w(),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,h.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},CZ=e=>{let t=(0,_.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=Cr(jC),l;t[0]===n?l=t[1]:(l=xZ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=SZ(n),{setFocusedContent:p}=$w(),{open:m}=oZ(),g;t[2]===m?g=t[3]:(g=()=>m(bZ),t[2]=m,t[3]=g);let v=g,{data:y}=LO(),b;t[4]!==f||t[5]!==v||t[6]!==p?(b=()=>{f(),p(null),v()},t[4]=f,t[5]=v,t[6]=p,t[7]=b):b=t[7];let x=b,[S,C]=(0,h.useState)(!1),T;t[8]===x?T=t[9]:(T=()=>{C(!1),x()},t[8]=x,t[9]=T);let E=T;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let D,O,k,A,j,M,N,P,F,I;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==y){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=y?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=_Z,I=u,t[32]!==i.value||t[33]!==x?(k={onBack:x,text:i.value},t[32]=i.value,t[33]=x,t[34]=k):k=t[34],A=f;let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>C(!0),t[35]=e):e=t[35];let n;t[36]===a.label.value?n=t[37]:(n=(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:hf,label:a.label.value,onClick:e}),t[36]=a.label.value,t[37]=n);let r;t[38]===a.popoverContent?r=t[39]:(r=(0,w.jsx)(hI.Detail,{identifier:`open-dictionary-editor`,children:(0,w.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[38]=a.popoverContent,t[39]=r);let o;t[40]!==n||t[41]!==r?(o=(0,w.jsxs)(hI,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],F=(0,w.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,w.jsx)(`h3`,{className:`w-full text-center text-lg`,children:O.title?O.title:O.key}),o]}),M=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,N=(0,w.jsx)(yZ,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,w.jsx)(yZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:O.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=x,t[17]=u,t[18]=a,t[19]=y,t[20]=D,t[21]=O,t[22]=k,t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I}else D=t[20],O=t[21],k=t[22],A=t[23],j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let L;t[43]===O.id?L=t[44]:(L=O.id&&(0,w.jsx)(yZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=L);let R;t[45]!==L||t[46]!==M||t[47]!==N||t[48]!==P?(R=(0,w.jsxs)(`div`,{className:M,children:[N,P,L]}),t[45]=L,t[46]=M,t[47]=N,t[48]=P,t[49]=R):R=t[49];let ee;t[50]!==R||t[51]!==F?(ee=(0,w.jsxs)(w.Fragment,{children:[F,R]}),t[50]=R,t[51]=F,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[53]=te):te=t[53];let z;t[54]!==O||t[55]!==x?(z=(0,w.jsx)(DX,{dictionary:O,mode:te,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=z):z=t[56];let B;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(B=d&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(GI,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,w.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,w.jsx)(XX,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,w.jsx)(FT,{dictionary:O})]}),t[57]=O,t[58]=S,t[59]=d,t[60]=x,t[61]=r,t[62]=o,t[63]=E,t[64]=B):B=t[64];let V;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ee||t[69]!==z||t[70]!==B||t[71]!==I?(V=(0,w.jsx)(D,{identifier:I,backButton:k,onClose:A,header:ee,footer:z,children:B}),t[65]=D,t[66]=k,t[67]=A,t[68]=ee,t[69]=z,t[70]=B,t[71]=I,t[72]=V):V=t[72],V},wZ=e=>{let t=(0,_.c)(4),{isDarkMode:n}=e,{focusedContent:r}=$w(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,w.jsx)(CZ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},TZ={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`]},EZ=()=>{let{drawerTitle:e,buttonLabel:t}=Cr(TZ),{set:n}=oZ(),{localeDictionaries:r}=Yw(),{editedContent:i}=iT(),{setFocusedContent:a}=$w(),{setSearch:o,search:s}=iZ(),c=(0,h.useMemo)(()=>new xz(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,h.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({[bZ]:!1,[xZ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,w.jsxs)(_Z,{title:e.label.value,identifier:bZ,children:[(0,w.jsx)(`div`,{className:`p-3 pb-4`,children:(0,w.jsx)(NJ,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,w.jsx)(`li`,{className:`w-full`,children:(0,w.jsx)(RC,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:$d,size:`md`,isFullWidth:!0,Icon:d(e.localId)?gf:void 0,children:(0,w.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,w.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,w.jsx)(yZ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,w.jsx)(yZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,w.jsx)(yZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,w.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},DZ={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`]},OZ=()=>{let e=(0,_.c)(8),{message:t}=Cr(DZ),[n]=qw(ow.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=G(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,w.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},kZ=e=>{let t=(0,_.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,w.jsx)(OZ,{})}),i=(0,w.jsx)(wZ,{}),a=(0,w.jsx)(EZ,{}),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,w.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},AZ=()=>{let e=(0,_.c)(2),[t,n]=(0,h.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(jZ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,h.useEffect)(r,i),t};function jZ(e){return e.json()}var MZ=e=>{let t=(0,_.c)(11),{children:n,iframeRef:r}=e,i=AZ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(FC,{}),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,w.jsx)(eT,{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},NZ={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`]},PZ=()=>{let e=(0,_.c)(9),{editedContent:t,setEditedContentState:n}=iT(),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,h.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,h.useEffect)(s,c),i},FZ={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`]},IZ=()=>{let e=(0,_.c)(11),{title:t,description:n,documentationLink:r}=Cr(FZ),i;e[0]===t?i=e[1]:(i=(0,w.jsx)(Mk,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,w.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,w.jsx)(_k,{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,w.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},LZ=e=>{let t=(0,_.c)(23),{iframeRef:n,applicationPath:r}=e,i=Cr(NZ),{editor:a}=nT()??{},{enabled:o}=aT(),s=oT();PZ(),cT();let[c,l]=(0,h.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=Jw(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,h.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(NC,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,w.jsx)(IZ,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,w.jsx)(FC,{isLoading:c}),t[5]=c,t[6]=m);let g=`${a.applicationURL}${r}`,v=i.intlayerApplication.value,y=c&&`hidden`,b;t[7]===y?b=t[8]:(b=G(`size-full`,y),t[7]=y,t[8]=b);let x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{l(!1)},t[9]=x):x=t[9];let S;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==b?(S=(0,w.jsx)(`iframe`,{src:g,title:v,sandbox:`allow-scripts allow-same-origin`,className:b,ref:n,onLoad:x}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=b,t[14]=S):S=t[14];let C;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(C=!o&&(0,w.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,w.jsx)(RC,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=C):C=t[18];let T;return t[19]!==S||t[20]!==C||t[21]!==m?(T=(0,w.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,S,C]}),t[19]=S,t[20]=C,t[21]=m,t[22]=T):T=t[22],T},RZ=()=>{let e=(0,_.c)(2),t=(0,h.useRef)(null),n=Wi(),r;return e[0]===n.pathname?r=e[1]:(r=(0,w.jsx)(MZ,{iframeRef:t,children:(0,w.jsx)(xr,{disableEditor:!0,children:(0,w.jsx)(kZ,{children:(0,w.jsx)(LZ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,g.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(h.StrictMode,{children:(0,w.jsx)(()=>{let e=(0,_.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(AC,{children:(0,w.jsx)(kC,{children:(0,w.jsx)(RZ,{})})}),e[0]=t):t=e[0],t},{})}));export{o as a,m as i,Pn as n,C as r,Hk as t};
|
|
177
|
+
}`,_J=18,vJ=40,yJ=`${vJ}px`,bJ=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),xJ=e=>{let t=(0,_.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(!1),[u,d]=(0,h.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-_J,f=c;document.querySelectorAll(bJ).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,g,v;t[5]!==n||t[6]!==i?(g=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=vJ)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},v=[n,i],t[5]=n,t[6]=i,t[7]=g,t[8]=v):(g=t[7],v=t[8]),(0,h.useEffect)(g,v);let y;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(y=()=>{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]=y):y=t[13];let b;t[14]!==r||t[15]!==a||t[16]!==i?(b=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=b):b=t[17],(0,h.useEffect)(y,b);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:yJ},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},SJ=e=>{let t=(0,h.useRef)(void 0);return(0,h.useEffect)(()=>{t.current=e}),t.current},CJ=(0,h.createContext)({}),wJ=({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=gJ,render:f,children:p,...m})=>{let[g,_]=(0,h.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),v=e??g,y=SJ(v),b=e=>{t?.(e),_(e)},x=r===void 0?null:typeof r==`string`?new RegExp(r):r,S=(0,h.useRef)(null),C=(0,h.useRef)(null),T=(0,h.useRef)({value:v,onChange:b,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),E=(0,h.useRef)({prev:[S.current?.selectionStart??null,S.current?.selectionEnd??null,S.current?.selectionDirection??`none`]});(0,h.useEffect)(()=>{let e=S.current,t=C.current;if(!e||!t)return;T.current.value!==e.value&&T.current.onChange(e.value),E.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=E.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&&S.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),E.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;`;hJ(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),hJ(e.sheet,`[data-input-otp]:autofill { ${t} }`),hJ(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),hJ(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; } }`),hJ(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[D,O]=(0,h.useState)(!1),[k,A]=(0,h.useState)(!1),[j,M]=(0,h.useState)(null),[N,P]=(0,h.useState)(null),[F,I]=(0,h.useState)(null);(0,h.useEffect)(()=>{mJ(()=>{S.current?.dispatchEvent(new Event(`input`));let e=S.current?.selectionStart??null,t=S.current?.selectionEnd??null,n=S.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),E.current.prev=[e,t,n])})},[v,k]),(0,h.useEffect)(()=>{y!==void 0&&v!==y&&y.length<n&&v.length===n&&o?.(v)},[n,o,y,v]);let L=(0,h.useRef)(null);(0,h.useEffect)(()=>{let e=k&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[k,F,s]);let R=xJ({containerRef:C,inputRef:S,pushPasswordManagerStrategy:c,isFocused:k}),ee=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&x&&!x.test(t)){e.preventDefault();return}typeof y==`string`&&t.length<y.length&&document.dispatchEvent(new Event(`selectionchange`)),b(t)},te=()=>{if(S.current){let e=Math.min(S.current.value.length,n-1),t=S.current.value.length;S.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},z=e=>{let t=S.current;if(!l&&(!T.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=S.current?.selectionStart,o=S.current?.selectionEnd,s=(a===o?v.slice(0,a??0)+i+v.slice(a??0):v.slice(0,a??0)+i+v.slice(o??0)).slice(0,n);if(!(s.length>0&&x&&!x.test(s))&&t){t.value=s,b(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},B={width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},V=(0,w.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":v.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:x?.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:B,maxLength:n,value:v,ref:S,onPaste:e=>{z(e),m.onPaste?.(e)},onChange:ee,onMouseOver:e=>{O(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{O(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=S.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{te(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),ne={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=v[t]===void 0?null:v[t];return{char:r,placeholderChar:v[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&D,setSelection:e=>{let t=S.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=v[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},re=f===void 0?(0,w.jsx)(CJ.Provider,{value:ne,children:p}):f(ne);return(0,w.jsxs)(w.Fragment,{children:[d!==null&&(0,w.jsx)(`noscript`,{children:(0,w.jsx)(`style`,{children:d})}),(0,w.jsxs)(`div`,{ref:C,className:G(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[re,(0,w.jsx)(`div`,{className:`absolute inset-0`,children:V})]})]})},TJ=({className:e,render:t,...n})=>(0,w.jsx)(wJ,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:G(`disabled:cursor-not-allowed`,e),render:t,...n}),EJ=({className:e,...t})=>(0,w.jsx)(`div`,{className:G(`z-10 flex items-center gap-3`,e),...t}),DJ=e=>{let t=(0,_.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,h.useContext)(CJ),{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 g=m;return(0,w.jsx)(RC,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:G(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:g,label:null,...o,children:(0,w.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},OJ=e=>(0,w.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,w.jsx)(df,{})}),kJ=e=>(0,w.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}),AJ=e=>e?.getAttribute(`aria-selected`)===`true`,jJ=({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}=eJ(),f=(0,h.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=WC(f,{selector:AJ,isHoverable:!0});return(0,h.useEffect)(()=>{m()},[]),(0,w.jsx)(aJ,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,w.jsx)(TJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(EJ,{children:[(0,w.jsx)(DJ,{index:0,ref:e=>{f.current[0]=e}}),(0,w.jsx)(DJ,{index:1,ref:e=>{f.current[1]=e}}),(0,w.jsx)(DJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,w.jsx)(OJ,{}),(0,w.jsxs)(EJ,{children:[(0,w.jsx)(DJ,{index:3,ref:e=>{f.current[3]=e}}),(0,w.jsx)(DJ,{index:4,ref:e=>{f.current[4]=e}}),(0,w.jsx)(DJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,w.jsx)(kJ,{style:p})]})})})},MJ=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}=SH();return(0,w.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,w.jsx)(jJ,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},NJ=({className:e,...t})=>(0,w.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,w.jsx)(bf,{className:`absolute left-2 size-4`}),(0,w.jsx)(hT,{...t,type:`search`,className:G(`pl-8`,e)})]}),PJ=e=>(0,w.jsx)(sJ,{id:e.name,"data-testid":e.name,Element:NJ,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),FJ=e=>(0,w.jsx)(sJ,{Element:gT,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}),IJ=e=>(0,w.jsx)(sJ,{Element:yT,id:e.name,"data-testid":e.name,...e}),LJ=Rd([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`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:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),RJ=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,w.jsx)(`input`,{type:`checkbox`,className:G(LJ({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),zJ=e=>{let{label:t,name:n,id:r}=e;return t?(0,w.jsxs)(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,w.jsx)(RJ,{id:r??n,...e}),t]}):(0,w.jsx)(RJ,{id:r??n,...e})},BJ=({inputLabel:e,value:t,onChange:n,...r})=>(0,w.jsx)(zJ,{...r,label:e,checked:!!t,onChange:n}),VJ=({autoComplete:e,...t})=>(0,w.jsx)(sJ,{Element:BJ,id:t.name,"data-testid":t.name,autoComplete:e,...t}),HJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(zV,{onValueChange:t.onChange,values:t.value,...l,children:c})})},UJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(HJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},WJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},GJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(WJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},KJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=eJ();return(0,w.jsx)(aJ,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,w.jsx)(ZC,{...t,...l,children:c})})},qJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=SH();return(0,w.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,w.jsx)(KJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},JJ=e=>{let t=(0,_.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=eJ(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,w.jsx)(PB,{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},YJ=e=>{let t=(0,_.c)(3),{formDescriptionId:n}=eJ(),r;return t[0]!==n||t[1]!==e?(r=(0,w.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},XJ=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=eJ(),a=r?String(r?.message??``):t;return a?(0,w.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=Jq;$.Description=YJ,$.Control=JJ,$.Field=$q,$.Item=Xq,$.Label=iJ,$.Message=XJ,$.Element=sJ,$.Input=uJ,$.InputPassword=pJ,$.Checkbox=VJ,$.TextArea=FJ,$.AutoSizedTextArea=IJ,$.Button=RC,$.Select=GJ,$.MultiSelect=UJ,$.EditableFieldInput=cJ,$.EditableFieldTextArea=lJ,$.SwitchSelector=qJ,$.OTP=MJ,$.SearchInput=PJ;var ZJ=Z(`ZodISODateTime`,(e,t)=>{DG.init(e,t),CY.init(e,t)});function QJ(e){return qK(ZJ,e)}var $J=Z(`ZodISODate`,(e,t)=>{OG.init(e,t),CY.init(e,t)});function eY(e){return JK($J,e)}var tY=Z(`ZodISOTime`,(e,t)=>{kG.init(e,t),CY.init(e,t)});function nY(e){return YK(tY,e)}var rY=Z(`ZodISODuration`,(e,t)=>{AG.init(e,t),CY.init(e,t)});function iY(e){return XK(rY,e)}var aY=(e,t)=>{oW.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>lW(e,t)},flatten:{value:t=>cW(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,DU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,DU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,aY);var oY=Z(`ZodError`,aY,{Parent:Error}),sY=uW(oY),cY=fW(oY),lY=mW(oY),uY=gW(oY),dY=vW(oY),fY=yW(oY),pY=bW(oY),mY=xW(oY),hY=SW(oY),gY=CW(oY),_Y=wW(oY),vY=TW(oY),yY=Z(`ZodType`,(e,t)=>(pG.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:wq(e,`input`),output:wq(e,`output`)}}),e.toJSONSchema=Cq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(PU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>WU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>sY(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lY(e,t,n),e.parseAsync=async(t,n)=>cY(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>uY(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>dY(e,t,n),e.decode=(t,n)=>fY(e,t,n),e.encodeAsync=async(t,n)=>pY(e,t,n),e.decodeAsync=async(t,n)=>mY(e,t,n),e.safeEncode=(t,n)=>hY(e,t,n),e.safeDecode=(t,n)=>gY(e,t,n),e.safeEncodeAsync=async(t,n)=>_Y(e,t,n),e.safeDecodeAsync=async(t,n)=>vY(e,t,n),e.refine=(t,n)=>e.check(wX(t,n)),e.superRefine=t=>e.check(TX(t)),e.overwrite=t=>e.check(cq(t)),e.optional=()=>oX(e),e.exactOptional=()=>cX(e),e.nullable=()=>uX(e),e.nullish=()=>oX(uX(e)),e.nonoptional=t=>gX(e,t),e.array=()=>JY(e),e.or=t=>QY([e,t]),e.and=t=>eX(e,t),e.transform=t=>bX(e,iX(t)),e.default=t=>fX(e,t),e.prefault=t=>mX(e,t),e.catch=t=>vX(e,t),e.pipe=t=>bX(e,t),e.readonly=()=>SX(e),e.describe=t=>{let n=e.clone();return CK.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return CK.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return CK.get(e);let n=e.clone();return CK.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bY=Z(`_ZodString`,(e,t)=>{mG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(nq(...t)),e.includes=(...t)=>e.check(aq(...t)),e.startsWith=(...t)=>e.check(oq(...t)),e.endsWith=(...t)=>e.check(sq(...t)),e.min=(...t)=>e.check(eq(...t)),e.max=(...t)=>e.check($K(...t)),e.length=(...t)=>e.check(tq(...t)),e.nonempty=(...t)=>e.check(eq(1,...t)),e.lowercase=t=>e.check(rq(t)),e.uppercase=t=>e.check(iq(t)),e.trim=()=>e.check(uq()),e.normalize=(...t)=>e.check(lq(...t)),e.toLowerCase=()=>e.check(dq()),e.toUpperCase=()=>e.check(fq()),e.slugify=()=>e.check(pq())}),xY=Z(`ZodString`,(e,t)=>{mG.init(e,t),bY.init(e,t),e.email=t=>e.check(TK(wY,t)),e.url=t=>e.check(jK(DY,t)),e.jwt=t=>e.check(KK(HY,t)),e.emoji=t=>e.check(MK(OY,t)),e.guid=t=>e.check(EK(TY,t)),e.uuid=t=>e.check(DK(EY,t)),e.uuidv4=t=>e.check(OK(EY,t)),e.uuidv6=t=>e.check(kK(EY,t)),e.uuidv7=t=>e.check(AK(EY,t)),e.nanoid=t=>e.check(NK(kY,t)),e.guid=t=>e.check(EK(TY,t)),e.cuid=t=>e.check(PK(AY,t)),e.cuid2=t=>e.check(FK(jY,t)),e.ulid=t=>e.check(IK(MY,t)),e.base64=t=>e.check(UK(zY,t)),e.base64url=t=>e.check(WK(BY,t)),e.xid=t=>e.check(LK(NY,t)),e.ksuid=t=>e.check(RK(PY,t)),e.ipv4=t=>e.check(zK(FY,t)),e.ipv6=t=>e.check(BK(IY,t)),e.cidrv4=t=>e.check(VK(LY,t)),e.cidrv6=t=>e.check(HK(RY,t)),e.e164=t=>e.check(GK(VY,t)),e.datetime=t=>e.check(QJ(t)),e.date=t=>e.check(eY(t)),e.time=t=>e.check(nY(t)),e.duration=t=>e.check(iY(t))});function SY(e){return wK(xY,e)}var CY=Z(`ZodStringFormat`,(e,t)=>{hG.init(e,t),bY.init(e,t)}),wY=Z(`ZodEmail`,(e,t)=>{vG.init(e,t),CY.init(e,t)}),TY=Z(`ZodGUID`,(e,t)=>{gG.init(e,t),CY.init(e,t)}),EY=Z(`ZodUUID`,(e,t)=>{_G.init(e,t),CY.init(e,t)}),DY=Z(`ZodURL`,(e,t)=>{yG.init(e,t),CY.init(e,t)}),OY=Z(`ZodEmoji`,(e,t)=>{bG.init(e,t),CY.init(e,t)}),kY=Z(`ZodNanoID`,(e,t)=>{xG.init(e,t),CY.init(e,t)}),AY=Z(`ZodCUID`,(e,t)=>{SG.init(e,t),CY.init(e,t)}),jY=Z(`ZodCUID2`,(e,t)=>{CG.init(e,t),CY.init(e,t)}),MY=Z(`ZodULID`,(e,t)=>{wG.init(e,t),CY.init(e,t)}),NY=Z(`ZodXID`,(e,t)=>{TG.init(e,t),CY.init(e,t)}),PY=Z(`ZodKSUID`,(e,t)=>{EG.init(e,t),CY.init(e,t)}),FY=Z(`ZodIPv4`,(e,t)=>{jG.init(e,t),CY.init(e,t)}),IY=Z(`ZodIPv6`,(e,t)=>{MG.init(e,t),CY.init(e,t)}),LY=Z(`ZodCIDRv4`,(e,t)=>{NG.init(e,t),CY.init(e,t)}),RY=Z(`ZodCIDRv6`,(e,t)=>{PG.init(e,t),CY.init(e,t)}),zY=Z(`ZodBase64`,(e,t)=>{IG.init(e,t),CY.init(e,t)}),BY=Z(`ZodBase64URL`,(e,t)=>{RG.init(e,t),CY.init(e,t)}),VY=Z(`ZodE164`,(e,t)=>{zG.init(e,t),CY.init(e,t)}),HY=Z(`ZodJWT`,(e,t)=>{VG.init(e,t),CY.init(e,t)}),UY=Z(`ZodUnknown`,(e,t)=>{HG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function WY(){return ZK(UY)}var GY=Z(`ZodNever`,(e,t)=>{UG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dq(e,t,n,r)});function KY(e){return QK(GY,e)}var qY=Z(`ZodArray`,(e,t)=>{GG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(eq(t,n)),e.nonempty=t=>e.check(eq(1,t)),e.max=(t,n)=>e.check($K(t,n)),e.length=(t,n)=>e.check(tq(t,n)),e.unwrap=()=>e.element});function JY(e,t){return mq(qY,e,t)}var YY=Z(`ZodObject`,(e,t)=>{XG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mq(e,t,n,r),MU(e,`shape`,()=>t.shape),e.keyof=()=>nX(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:WY()}),e.loose=()=>e.clone({...e._zod.def,catchall:WY()}),e.strict=()=>e.clone({...e._zod.def,catchall:KY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>JU(e,t),e.safeExtend=t=>YU(e,t),e.merge=t=>XU(e,t),e.pick=t=>KU(e,t),e.omit=t=>qU(e,t),e.partial=(...t)=>ZU(aX,e,t[0]),e.required=(...t)=>QU(hX,e,t[0])});function XY(e,t){return new YY({type:`object`,shape:e??{},...Q(t)})}var ZY=Z(`ZodUnion`,(e,t)=>{QG.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nq(e,t,n,r),e.options=t.options});function QY(e,t){return new ZY({type:`union`,options:e,...Q(t)})}var $Y=Z(`ZodIntersection`,(e,t)=>{$G.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pq(e,t,n,r)});function eX(e,t){return new $Y({type:`intersection`,left:e,right:t})}var tX=Z(`ZodEnum`,(e,t)=>{nK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oq(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 tX({...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 tX({...t,checks:[],...Q(r),entries:i})}});function nX(e,t){return new tX({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var rX=Z(`ZodTransform`,(e,t)=>{rK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new CU(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(iW(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(iW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function iX(e){return new rX({type:`transform`,transform:e})}var aX=Z(`ZodOptional`,(e,t)=>{aK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oX(e){return new aX({type:`optional`,innerType:e})}var sX=Z(`ZodExactOptional`,(e,t)=>{oK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cX(e){return new sX({type:`optional`,innerType:e})}var lX=Z(`ZodNullable`,(e,t)=>{sK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uX(e){return new lX({type:`nullable`,innerType:e})}var dX=Z(`ZodDefault`,(e,t)=>{cK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fX(e,t){return new dX({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}var pX=Z(`ZodPrefault`,(e,t)=>{uK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mX(e,t){return new pX({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}var hX=Z(`ZodNonOptional`,(e,t)=>{dK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gX(e,t){return new hX({type:`nonoptional`,innerType:e,...Q(t)})}var _X=Z(`ZodCatch`,(e,t)=>{pK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vX(e,t){return new _X({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var yX=Z(`ZodPipe`,(e,t)=>{mK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bq(e,t,n,r),e.in=t.in,e.out=t.out});function bX(e,t){return new yX({type:`pipe`,in:e,out:t})}var xX=Z(`ZodReadonly`,(e,t)=>{gK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function SX(e){return new xX({type:`readonly`,innerType:e})}var CX=Z(`ZodCustom`,(e,t)=>{vK.init(e,t),yY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kq(e,t,n,r)});function wX(e,t={}){return hq(CX,e,t)}function TX(e){return gq(e)}var EX={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`]},DX=e=>{let t=(0,_.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,h.useState)(!1),{setLocaleDictionary:u}=Xw(),{mutate:d,isPending:f}=BO(),{mutate:p,isPending:m}=GO(),{mutate:g,isPending:v}=zO(),y=m||v,{editedContent:b,restoreEditedContent:x}=iT(),{deleteButton:S,resetButton:C,saveButton:T,publishButton:E,downloadButton:D,confirmation:O}=Cr(EX),{isAuthenticated:k}=MO(),A=b?.[n.localId],j;t[0]!==n||t[1]!==A?(j=A&&JSON.stringify(A)!==JSON.stringify(n),t[0]=n,t[1]=A,t[2]=j):j=t[2];let M=j,N=n?.id!==void 0,P;t[3]!==n||t[4]!==b||t[5]!==o||t[6]!==x||t[7]!==u||t[8]!==p?(P=async()=>{b?.[n.localId]&&p({dictionary:{...n,...b?.[n.localId]}},{onSuccess:()=>{u(b?.[n.localId]),x(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=b,t[5]=o,t[6]=x,t[7]=u,t[8]=p,t[9]=P):P=t[9];let F=P,I;t[10]!==n||t[11]!==b||t[12]!==o||t[13]!==g||t[14]!==x||t[15]!==u?(I=()=>{let e={...n,...b?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),x(n.localId),o?.())}})},t[10]=n,t[11]=b,t[12]=o,t[13]=g,t[14]=x,t[15]=u,t[16]=I):I=t[16];let L=I,R;t[17]!==d||t[18]!==n||t[19]!==a?(R=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=R):R=t[20];let ee=R,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let z;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>l(!1),t[22]=z):z=t[22],(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(GI,{isOpen:c,title:O.title.value,size:`md`,onClose:te,padding:`md`,children:(0,w.jsxs)(`form`,{className:`size-full`,children:[(0,w.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:O.message}),(0,w.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,w.jsx)($.Button,{label:O.cancelButton.label.value,disabled:!M||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:z,children:O.cancelButton.text}),(0,w.jsx)($.Button,{label:O.confirmButton.label.value,disabled:!M||y,Icon:yf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:F,children:O.confirmButton.text})]})]})}),(0,w.jsxs)(`form`,{className:G(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&N&&a&&k&&(0,w.jsx)($.Button,{label:S.label.value,Icon:xf,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:S.text}),M&&(0,w.jsx)($.Button,{label:C.label.value,disabled:!M,Icon:vf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>x(n.localId),children:C.text}),r.includes(`local`)&&(0,w.jsx)($.Button,{label:D.label.value,disabled:!M||y,Icon:of,color:`text`,variant:k?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:D.text}),r.includes(`remote`)&&k&&!N&&(0,w.jsx)($.Button,{label:E.label.value,disabled:y,Icon:Xd,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:L,children:E.text}),r.includes(`remote`)&&k&&N&&M&&(0,w.jsx)($.Button,{label:T.label.value,disabled:!M||y,Icon:yf,color:`text`,className:`max-md:w-full`,isLoading:v,onClick:L,children:T.text})]})]})},OX={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`]},kX=(e,t=2e3,n,r)=>{let[i,a]=(0,h.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))}}}},AX=e=>{let t=(0,_.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,v=d===void 0?!0:d,y=f===void 0?!0:f,b=p===void 0?14:p,{isCopied:x,copy:S}=kX(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,w.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let C;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==S||t[8]!==x||t[9]!==v||t[10]!==b||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),S()},o=x?h:m,s=x?rf:af;C=(0,w.jsxs)(`span`,{className:G(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":x,"data-testid":`copy-to-clipboard`,children:[(0,w.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,w.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:b,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=S,t[8]=x,t[9]=v,t[10]=b,t[11]=y,t[12]=n,t[13]=C}else C=t[13];return C},jX={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`]},MX={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`]},NX=e=>{let t=(0,_.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:v}=Cr(MX),y;if(t[0]!==u||t[1]!==l||t[2]!==v||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 _;t[18]!==r||t[19]!==n?(_=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=_):_=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]!==v||t[36]!==g?(T=e=>e.input===void 0?g.value:v.value,t[35]=v,t[36]=g,t[37]=T):T=t[37],y=XY({title:SY({error:_}).refine(PX,{error:i.value}).optional(),key:SY({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:SY({error:x}).optional(),projectIds:JY(SY({error:S})).default([e]),tags:JY(SY({error:C})).default([]),location:nX([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:nX([`static`,`dynamic`,`fetch`]).optional(),filePath:SY({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=v,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]=y}else y=t[17];return y};function PX(e){return e.length===0||e.length>=4}var FX=e=>{let t=(0,_.c)(55),{dictionary:n,mode:r}=e,{session:i}=jO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=RO(),{data:l}=VO(),u=s?.data??[],d=l?.data??[],f=NX(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:g,isSubmitting:v}=Yq(f,m),{editedContent:y,setEditedDictionary:b}=iT(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:T,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=Cr(jX),{mutate:j,isPending:M}=HO(),N=y?.[n.localId],P;t[5]!==n||t[6]!==g?(P=()=>{g.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=g,t[7]=P):P=t[7];let F=g?.reset,I;t[8]!==n||t[9]!==F?(I=[n,F],t[8]=n,t[9]=F,t[10]=I):I=t[10],(0,h.useEffect)(P,I);let L;t[11]!==n||t[12]!==g||t[13]!==N?(L=()=>{N===void 0&&g.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=g,t[13]=N,t[14]=L):L=t[14];let R;t[15]===N?R=t[16]:(R=[N],t[15]=N,t[16]=R),(0,h.useEffect)(L,R);let ee;t[17]!==j||t[18]!==n||t[19]!==g||t[20]!==b||t[21]!==N?(ee=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;b(t=>({...t,...e,...n})),g.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=g,t[20]=b,t[21]=N,t[22]=ee):ee=t[22];let te=ee,z;t[23]===g.control?z=t[24]:(z={control:g.control,name:`location`},t[23]=g.control,t[24]=z);let B=vH(z),V=B===`local`||B===`hybrid`,ne;t[25]!==n||t[26]!==g||t[27]!==b?(ne=e=>{g.setValue(`key`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=g,t[27]=b,t[28]=ne):ne=t[28];let re;t[29]!==n||t[30]!==g||t[31]!==b?(re=e=>{g.setValue(`title`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=g,t[31]=b,t[32]=re):re=t[32];let ie;t[33]!==n||t[34]!==g||t[35]!==b?(ie=e=>{g.setValue(`description`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=g,t[35]=b,t[36]=ie):ie=t[36];let ae;t[37]!==n||t[38]!==g||t[39]!==D||t[40]!==r||t[41]!==b?(ae=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?g.getValues(`filePath`)??n.filePath:void 0;e||g.setValue(`filePath`,void 0),b(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),b(e=>({...n,...e??{},location:r}))};return(0,w.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,w.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,w.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,w.jsx)(zJ,{id:`location-local`,name:`location-local`,label:D.local.value,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,w.jsx)(zJ,{id:`location-remote`,name:`location-remote`,label:D.remote.value,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,w.jsx)($.Description,{children:D.testDescription}),(0,w.jsx)($.Message,{})]})},t[37]=n,t[38]=g,t[39]=D,t[40]=r,t[41]=b,t[42]=ae):ae=t[42];let oe;t[43]!==n||t[44]!==g||t[45]!==b?(oe=e=>{g.setValue(`importMode`,e,{shouldDirty:!0}),b(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=g,t[45]=b,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==g||t[49]!==b?(se=e=>{let t=[e].flat();g.setValue(`projectIds`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=g,t[49]=b,t[50]=se):se=t[50];let ce;return t[51]!==n||t[52]!==g||t[53]!==b?(ce=e=>{let t=[e].flat();g.setValue(`tags`,t,{shouldDirty:!0}),b(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=g,t[53]=b,t[54]=ce):ce=t[54],(0,w.jsxs)($,{className:`flex w-full flex-col gap-8`,...g,schema:f,children:[(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:v,isRequired:!0,onSave:ne}),(0,w.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:v,onSave:re})]}),(0,w.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:v,onSave:ie}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,w.jsx)($.Field,{control:g.control,name:`location`,render:ae}),(0,w.jsx)(Ox,{mode:`wait`,children:V&&(0,w.jsx)(EC.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,w.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:v||!V,onChange:e=>{let t=e.target.value;b(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,w.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,w.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:oe,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:O.label.value})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,w.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,w.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,w.jsxs)($.MultiSelect,{name:`projectIds`,label:T.label.value,description:T.description,onValueChange:se,children:[(0,w.jsx)(zV.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,w.jsx)(zV.Input,{placeholder:T.placeholder.value})}),(0,w.jsx)(zV.Content,{children:(0,w.jsx)(FC,{isLoading:c,children:(0,w.jsx)(zV.List,{children:u?.map(IX)})})})]}),(0,w.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:ce,children:[(0,w.jsx)(zV.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,w.jsx)(zV.Input,{placeholder:E.placeholder.value})}),(0,w.jsx)(zV.Content,{children:(0,w.jsx)(FC,{isLoading:c,children:(0,w.jsx)(zV.List,{children:d?.map(LX)})})})]})]}),(0,w.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,w.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Sf,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:v||M,isLoading:M})})]})};function IX(e){return(0,w.jsx)(zV.Item,{value:String(e.id),children:e.name},String(e.id))}function LX(e){return(0,w.jsx)(zV.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var RX=(0,h.lazy)(()=>Pn(()=>import(`./dist-BuBdloo5.js`).then(e=>({default:e.Editor})),__vite__mapDeps([3,1]))),zX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,h.useRef)(null),c=(0,h.useRef)(null),[l,u]=(0,h.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(`
|
|
178
|
+
`).length>1:!1);return(0,w.jsxs)(`div`,{className:G(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,w.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,w.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,w.jsx)(_I,{content:e})})}),(0,w.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,w.jsx)(h.Suspense,{fallback:(0,w.jsx)(FC,{}),children:(0,w.jsx)(RX,{...l,defaultLanguage:`typescript`,language:t,loading:(0,w.jsx)(FC,{}),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`})})})]})},BX=e=>{let t=(0,_.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=iT(),o=VX,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,w.jsx)(zX,{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 VX(e){try{return JSON.parse(e),!0}catch{return!1}}var HX={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`]},UX={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`,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`,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`,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`,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`,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:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,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`,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`,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:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},WX=e=>{let t=(0,_.c)(22),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,triggerPlaceHolder:d,nest:f,gender:p,condition:m,markdown:g,insertion:v,reactNode:y,file:b}=Cr(UX),x;t[0]===n?x=t[1]:(x=Mw(n),t[0]=n,t[1]=x);let[S,C]=(0,h.useState)(x),T;t[2]===r?T=t[3]:(T=e=>{C(e),r(e)},t[2]=r,t[3]=T);let E=T,D;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==b||t[9]!==p||t[10]!==v||t[11]!==S||t[12]!==g||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==y||t[19]!==a||t[20]!==d?(D=(0,w.jsxs)(J,{value:S,onValueChange:E,children:[(0,w.jsx)(J.Trigger,{children:(0,w.jsx)(J.Value,{placeholder:d})}),(0,w.jsxs)(J.Content,{children:[(0,w.jsx)(J.Item,{value:O,children:i}),(0,w.jsx)(J.Item,{value:ee,children:a}),(0,w.jsx)(J.Item,{value:te,children:o}),(0,w.jsx)(J.Item,{value:z,children:s}),(0,w.jsx)(J.Item,{value:N,children:c}),(0,w.jsx)(J.Item,{value:P,children:l}),(0,w.jsx)(J.Item,{value:k,children:u}),(0,w.jsx)(J.Item,{value:B,children:p}),(0,w.jsx)(J.Item,{value:j,children:v}),(0,w.jsx)(J.Item,{value:L,children:g}),(0,w.jsx)(J.Item,{value:F,children:f}),(0,w.jsx)(J.Item,{value:A,children:m}),(0,w.jsx)(J.Item,{value:I,disabled:!0,children:y}),(0,w.jsx)(J.Item,{value:M,children:b})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=b,t[9]=p,t[10]=v,t[11]=S,t[12]=g,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=y,t[19]=a,t[20]=d,t[21]=D):D=t[21],D},GX=e=>{let t=(0,_.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=nT()?.internationalization.locales??[],s=Mw(n),c=kw(n),l=e=>{a(Dw(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(WX,{section:n,onValueChange:e=>a(Dw(e,o))}),(0,w.jsx)(GX,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,w.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,w.jsx)(WX,{section:n,onValueChange:e=>a(Dw(e,o))}),(0,w.jsx)(GX,{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(Dw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(WX,{section:n,onValueChange:s}),(0,w.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,w.jsx)(JX,{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(Dw(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,w.jsx)(WX,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},KX=e=>{let t=(0,_.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=$w(),{renameEditedContent:c,addEditedContent:l}=rT(),{titleInput:u,deleteButton:d}=Cr(HX),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,w.jsx)(NC,{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":hr(i,o?.keyPath??[]),onClick:e,children:(0,w.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,w.jsxs)(`div`,{className:`w-full`,children:[(0,w.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,w.jsx)(kT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,w.jsx)(RC,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:xf,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,w.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,yr(n),` )`]})]}),(0,w.jsx)(GX,{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},qX=e=>{let t=(0,_.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=Cr(HX),{setFocusedContentKeyPath:o}=$w(),{addEditedContent:s}=rT();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.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:N,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,w.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,w.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,w.jsx)(`li`,{className:`flex w-full`,children:(0,w.jsx)(KX,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:N,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,w.jsx)(RC,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:_f,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},JX=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,w.jsx)(KX,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,w.jsx)(qX,{section:e,keyPath:t,dictionaryLocalId:n}),YX=e=>{let t=(0,_.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=iT(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,w.jsx)(KX,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},XX=e=>{let t=(0,_.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=nT(),{returnToDictionaryList:d}=Cr(OX),{focusedContent:f,setFocusedContent:p}=$w(),{setLocaleDictionary:m}=Xw(),g;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(g=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=g):g=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,h.useEffect)(g,v);let y;if(t[6]!==u?.internationalization.locales||t[7]!==n||t[8]!==i||t[9]!==a||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==d||t[14]!==p||t[15]!==l){let e;t[17]!==o||t[18]!==p?(e=()=>{p(null),o?.()},t[17]=o,t[18]=p,t[19]=e):e=t[19],y=(0,w.jsx)(BT,{availableLocales:u?.internationalization.locales??[],children:(0,w.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,w.jsx)(RC,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:Yd,label:d.label.value,children:d.text}),(0,w.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,w.jsxs)(PI,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,w.jsx)(PI.Item,{label:`Details`,value:`details`,children:(0,w.jsx)(FX,{dictionary:n,mode:a})}),(0,w.jsx)(PI.Item,{label:`Structure`,value:`structure`,children:(0,w.jsx)(YX,{dictionary:n})}),(0,w.jsx)(PI.Item,{label:`Content`,value:`content`,children:(0,w.jsx)(Dz,{dictionary:n,isDarkMode:i})}),(0,w.jsx)(PI.Item,{label:`JSON`,value:`json`,children:(0,w.jsx)(BX,{dictionary:n,isDarkMode:i})})]})}),(0,w.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,w.jsx)(AX,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,w.jsx)(DX,{dictionary:n,mode:a,onDelete:e,onSave:s})]})]})}),t[6]=u?.internationalization.locales,t[7]=n,t[8]=i,t[9]=a,t[10]=r,t[11]=o,t[12]=s,t[13]=d,t[14]=p,t[15]=l,t[16]=y}else y=t[16];return y},ZX=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}},QX=()=>{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)},$X=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},eZ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},tZ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},nZ=(e=`md`)=>{let t=ZX(e),n=QX(),r=tZ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:$X(),isMac:eZ()}},rZ=e=>{let t=(0,_.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=nZ(n),t[0]=n,t[1]=r);let[i,a]=(0,h.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(nZ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,h.useEffect)(o,s),i},iZ=e=>{let t=(0,_.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,h.useRef)(``),p=(0,h.useRef)(null),[m,g]=(0,h.useState)(o??``),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=v):v=t[2];let y=v,b;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(b=e=>{f.current=e;let t=d?e.trim():e;if(y(),t.length<l){g(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(g(e),s?.(e)):(g(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=b):b=t[8];let x=b,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{y()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,h.useEffect)(S,C);let w=m.length>=l,T;return t[11]!==m||t[12]!==x||t[13]!==w?(T={setSearch:x,search:m,hasMinChars:w},t[11]=m,t[12]=x,t[13]=w,t[14]=T):T=t[14],T},aZ=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()})}},oZ=()=>{let e=(0,_.c)(2),t=(0,h.useSyncExternalStore)(aZ.subscribe,aZ.getSnapshot,sZ),n;return e[0]===t?n=e[1]:(n={open:aZ.open,close:aZ.close,set:aZ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function sZ(){return{}}var cZ={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`]},lZ=e=>e.split(` + `).map(e=>e.trim()),uZ=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,dZ=(e,t)=>{let n=t.map(uZ),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(uZ(e)));if(!i)return!1;let a=uZ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},fZ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,pZ=(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},mZ=e=>{let t=(0,_.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}=rZ(),f;t[0]!==d||t[1]!==n?(f=lZ(pZ(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[g,v]=(0,h.useState)(m),y,b;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(y=()=>{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(fZ(i))):a.add(i.toUpperCase()),v(a),!l&&r&&dZ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{v(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)}},b=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=y,t[9]=b):(y=t[8],b=t[9]),(0,h.useEffect)(y,b),!c)return null;let x;t[10]===g?x=t[11]:(x=e=>{let t=e.toUpperCase(),n=uZ(e);return g.has(e)||g.has(t)||g.has(n)||e===`⌘`&&g.has(`Meta`)||e===`Ctrl`&&g.has(`Control`)||e===`⌥`&&g.has(`Alt`)||e===`Alt`&&g.has(`Alt`)||e===`←`&&g.has(`ArrowLeft`)||e===`→`&&g.has(`ArrowRight`)||e===`↑`&&g.has(`ArrowUp`)||e===`↓`&&g.has(`ArrowDown`)},t[10]=g,t[11]=x);let S=x,C;if(t[12]!==o||t[13]!==S||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==S||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=fZ(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,w.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,w.jsx)(`span`,{className:G(`min-w-4 px-0.5 text-center`,S(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=S,t[19]=n,t[20]=e):e=t[20],C=(0,w.jsx)(`kbd`,{className:G(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=S,t[14]=p,t[15]=n,t[16]=u,t[17]=C}else C=t[17];return C},hZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,w.jsx)(`div`,{className:G(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,w.jsx)(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ml-auto`),children:e})}),gZ=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},_Z=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=Cr(cZ),{isMobile:d}=rZ(`md`),f=(0,h.useRef)(null),p=(0,h.useRef)(null),m=II(l),{open:g,close:_,isOpen:v}=oZ(),y=v(t),b=y;VI({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,h.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=gZ(f.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,_,c,a,t]);let x=(0,h.useRef)(c);return(0,h.useEffect)(()=>{x.current=c},[c]),(0,h.useEffect)(()=>{s!==void 0&&s!==y&&(s?g(t):(_(t),x.current?.()))},[s,y,t,g,_]),m?(0,au.createPortal)((0,w.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,w.jsx)(hZ,{isHidden:!b,align:`right`,children:(0,w.jsxs)(NC,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,w.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,w.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,w.jsx)(`div`,{children:o&&(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:ef,children:o?.text})}),(0,w.jsx)(`div`,{children:(0,w.jsxs)(hI,{identifier:`close-drawer`,children:[(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{_(t),c?.()},Icon:Cf,size:`icon-md`}),(0,w.jsx)(hI.Detail,{identifier:`close-drawer`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,w.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,w.jsx)(mZ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&(0,w.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,w.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,w.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(_(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,w.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,w.jsx)(w.Fragment,{})},vZ=Rd(`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`}}),yZ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,w.jsx)(`div`,{className:vZ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),bZ=`dictionaryList`,xZ=e=>`dictionary_edition_${e}`,SZ=e=>{let t=(0,_.c)(20),n;t[0]===e?n=t[1]:(n=xZ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=oZ(),{getEditedContentValue:s}=rT(),{focusedContent:c,setFocusedContent:l}=$w(),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,h.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},CZ=e=>{let t=(0,_.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=Cr(jC),l;t[0]===n?l=t[1]:(l=xZ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=SZ(n),{setFocusedContent:p}=$w(),{open:m}=oZ(),g;t[2]===m?g=t[3]:(g=()=>m(bZ),t[2]=m,t[3]=g);let v=g,{data:y}=WO(),b;t[4]!==f||t[5]!==v||t[6]!==p?(b=()=>{f(),p(null),v()},t[4]=f,t[5]=v,t[6]=p,t[7]=b):b=t[7];let x=b,[S,C]=(0,h.useState)(!1),T;t[8]===x?T=t[9]:(T=()=>{C(!1),x()},t[8]=x,t[9]=T);let E=T;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let D,O,k,A,j,M,N,P,F,I;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==y){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=y?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,w.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=_Z,I=u,t[32]!==i.value||t[33]!==x?(k={onBack:x,text:i.value},t[32]=i.value,t[33]=x,t[34]=k):k=t[34],A=f;let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>C(!0),t[35]=e):e=t[35];let n;t[36]===a.label.value?n=t[37]:(n=(0,w.jsx)(RC,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:hf,label:a.label.value,onClick:e}),t[36]=a.label.value,t[37]=n);let r;t[38]===a.popoverContent?r=t[39]:(r=(0,w.jsx)(hI.Detail,{identifier:`open-dictionary-editor`,children:(0,w.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[38]=a.popoverContent,t[39]=r);let o;t[40]!==n||t[41]!==r?(o=(0,w.jsxs)(hI,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],F=(0,w.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,w.jsx)(`h3`,{className:`w-full text-center text-lg`,children:O.title?O.title:O.key}),o]}),M=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,N=(0,w.jsx)(yZ,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,w.jsx)(yZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:O.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=x,t[17]=u,t[18]=a,t[19]=y,t[20]=D,t[21]=O,t[22]=k,t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I}else D=t[20],O=t[21],k=t[22],A=t[23],j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let L;t[43]===O.id?L=t[44]:(L=O.id&&(0,w.jsx)(yZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=L);let R;t[45]!==L||t[46]!==M||t[47]!==N||t[48]!==P?(R=(0,w.jsxs)(`div`,{className:M,children:[N,P,L]}),t[45]=L,t[46]=M,t[47]=N,t[48]=P,t[49]=R):R=t[49];let ee;t[50]!==R||t[51]!==F?(ee=(0,w.jsxs)(w.Fragment,{children:[F,R]}),t[50]=R,t[51]=F,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[53]=te):te=t[53];let z;t[54]!==O||t[55]!==x?(z=(0,w.jsx)(DX,{dictionary:O,mode:te,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=z):z=t[56];let B;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(B=d&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(GI,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,w.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,w.jsx)(XX,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,w.jsx)(FT,{dictionary:O})]}),t[57]=O,t[58]=S,t[59]=d,t[60]=x,t[61]=r,t[62]=o,t[63]=E,t[64]=B):B=t[64];let V;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ee||t[69]!==z||t[70]!==B||t[71]!==I?(V=(0,w.jsx)(D,{identifier:I,backButton:k,onClose:A,header:ee,footer:z,children:B}),t[65]=D,t[66]=k,t[67]=A,t[68]=ee,t[69]=z,t[70]=B,t[71]=I,t[72]=V):V=t[72],V},wZ=e=>{let t=(0,_.c)(4),{isDarkMode:n}=e,{focusedContent:r}=$w(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(w.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,w.jsx)(CZ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},TZ={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`]},EZ=()=>{let{drawerTitle:e,buttonLabel:t}=Cr(TZ),{set:n}=oZ(),{localeDictionaries:r}=Yw(),{editedContent:i}=iT(),{setFocusedContent:a}=$w(),{setSearch:o,search:s}=iZ(),c=(0,h.useMemo)(()=>new xz(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,h.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({[bZ]:!1,[xZ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,w.jsxs)(_Z,{title:e.label.value,identifier:bZ,children:[(0,w.jsx)(`div`,{className:`p-3 pb-4`,children:(0,w.jsx)(NJ,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,w.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,w.jsx)(`li`,{className:`w-full`,children:(0,w.jsx)(RC,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:$d,size:`md`,isFullWidth:!0,Icon:d(e.localId)?gf:void 0,children:(0,w.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,w.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,w.jsx)(yZ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,w.jsx)(yZ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,w.jsx)(yZ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,w.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},DZ={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`]},OZ=()=>{let e=(0,_.c)(8),{message:t}=Cr(DZ),[n]=qw(ow.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=G(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,w.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},kZ=e=>{let t=(0,_.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,w.jsx)(OZ,{})}),i=(0,w.jsx)(wZ,{}),a=(0,w.jsx)(EZ,{}),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,w.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},AZ=()=>{let e=(0,_.c)(2),[t,n]=(0,h.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(jZ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,h.useEffect)(r,i),t};function jZ(e){return e.json()}var MZ=e=>{let t=(0,_.c)(11),{children:n,iframeRef:r}=e,i=AZ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(FC,{}),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,w.jsx)(eT,{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},NZ={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`]},PZ=()=>{let e=(0,_.c)(9),{editedContent:t,setEditedContentState:n}=iT(),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,h.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,h.useEffect)(s,c),i},FZ={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`]},IZ=()=>{let e=(0,_.c)(11),{title:t,description:n,documentationLink:r}=Cr(FZ),i;e[0]===t?i=e[1]:(i=(0,w.jsx)(Mk,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,w.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,w.jsx)(_k,{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,w.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},LZ=e=>{let t=(0,_.c)(23),{iframeRef:n,applicationPath:r}=e,i=Cr(NZ),{editor:a}=nT()??{},{enabled:o}=aT(),s=oT();PZ(),cT();let[c,l]=(0,h.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=Jw(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,h.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,w.jsx)(NC,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,w.jsx)(IZ,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,w.jsx)(FC,{isLoading:c}),t[5]=c,t[6]=m);let g=`${a.applicationURL}${r}`,v=i.intlayerApplication.value,y=c&&`hidden`,b;t[7]===y?b=t[8]:(b=G(`size-full`,y),t[7]=y,t[8]=b);let x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>{l(!1)},t[9]=x):x=t[9];let S;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==b?(S=(0,w.jsx)(`iframe`,{src:g,title:v,sandbox:`allow-scripts allow-same-origin`,className:b,ref:n,onLoad:x}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=b,t[14]=S):S=t[14];let C;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(C=!o&&(0,w.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,w.jsx)(RC,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=C):C=t[18];let T;return t[19]!==S||t[20]!==C||t[21]!==m?(T=(0,w.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,S,C]}),t[19]=S,t[20]=C,t[21]=m,t[22]=T):T=t[22],T},RZ=()=>{let e=(0,_.c)(2),t=(0,h.useRef)(null),n=Wi(),r;return e[0]===n.pathname?r=e[1]:(r=(0,w.jsx)(MZ,{iframeRef:t,children:(0,w.jsx)(xr,{disableEditor:!0,children:(0,w.jsx)(kZ,{children:(0,w.jsx)(LZ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,g.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(h.StrictMode,{children:(0,w.jsx)(()=>{let e=(0,_.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(AC,{children:(0,w.jsx)(kC,{children:(0,w.jsx)(RZ,{})})}),e[0]=t):t=e[0],t},{})}));export{o as a,m as i,Pn as n,C as r,Hk as t};
|