@gouvfr-lasuite/ui-kit 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cunningham.ts +0 -6
- package/dist/index.cjs +37 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -9
- package/dist/index.js +5149 -4950
- package/dist/index.js.map +1 -1
- package/dist/storybook/hero-image.png +0 -0
- package/dist/storybook/logo-fichiers.svg +4 -0
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),_t=require("@openfun/cunningham-react"),Ht=require("react-dom");function yu(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const T=yu(d),c0=yu(Ht);function d0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cr={exports:{}},On={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Wa;function f0(){if(Wa)return On;Wa=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var l in i)l!=="key"&&(o[l]=i[l])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:o}}return On.Fragment=e,On.jsx=n,On.jsxs=n,On}var _n={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Ua;function h0(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&function(){function t($){if($==null)return null;if(typeof $=="function")return $.$$typeof===_?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case O:return"Fragment";case x:return"Portal";case b:return"Profiler";case D:return"StrictMode";case H:return"Suspense";case E:return"SuspenseList"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case V:return($.displayName||"Context")+".Provider";case k:return($._context.displayName||"Context")+".Consumer";case R:var U=$.render;return $=$.displayName,$||($=U.displayName||U.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return U=$.displayName||null,U!==null?U:t($.type)||"Memo";case j:U=$._payload,$=$._init;try{return t($(U))}catch{}}return null}function e($){return""+$}function n($){try{e($);var U=!1}catch{U=!0}if(U){U=console;var q=U.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return q.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e($)}}function r(){}function i(){if(K===0){A=console.log,z=console.info,B=console.warn,F=console.error,X=console.group,te=console.groupCollapsed,de=console.groupEnd;var $={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}K++}function o(){if(K--,K===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},$,{value:A}),info:Y({},$,{value:z}),warn:Y({},$,{value:B}),error:Y({},$,{value:F}),group:Y({},$,{value:X}),groupCollapsed:Y({},$,{value:te}),groupEnd:Y({},$,{value:de})})}0>K&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a($){if(ce===void 0)try{throw Error()}catch(q){var U=q.stack.trim().match(/\n( *(at )?)/);ce=U&&U[1]||"",oe=-1<q.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<q.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+ce+$+oe}function
|
|
19
|
+
`+ce+$+oe}function l($,U){if(!$||ge)return"";var q=re.get($);if(q!==void 0)return q;ge=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=M.H,M.H=null,i();try{var Se={DetermineComponentFrameRoot:function(){try{if(U){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(Xe){var ur=Xe}Reflect.construct($,[],st)}else{try{st.call()}catch(Xe){ur=Xe}$.call(st.prototype)}}else{try{throw Error()}catch(Xe){ur=Xe}(st=$())&&typeof st.catch=="function"&&st.catch(function(){})}}catch(Xe){if(Xe&&ur&&typeof Xe.stack=="string")return[Xe.stack,ur.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var le=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");le&&le.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Q=Se.DetermineComponentFrameRoot(),Ze=Q[0],Bt=Q[1];if(Ze&&Bt){var Ee=Ze.split(`
|
|
20
20
|
`),bt=Bt.split(`
|
|
21
|
-
`);for(
|
|
22
|
-
|
|
21
|
+
`);for(Q=le=0;le<Ee.length&&!Ee[le].includes("DetermineComponentFrameRoot");)le++;for(;Q<bt.length&&!bt[Q].includes("DetermineComponentFrameRoot");)Q++;if(le===Ee.length||Q===bt.length)for(le=Ee.length-1,Q=bt.length-1;1<=le&&0<=Q&&Ee[le]!==bt[Q];)Q--;for(;1<=le&&0<=Q;le--,Q--)if(Ee[le]!==bt[Q]){if(le!==1||Q!==1)do if(le--,Q--,0>Q||Ee[le]!==bt[Q]){var Dn=`
|
|
22
|
+
`+Ee[le].replace(" at new "," at ");return $.displayName&&Dn.includes("<anonymous>")&&(Dn=Dn.replace("<anonymous>",$.displayName)),typeof $=="function"&&re.set($,Dn),Dn}while(1<=le&&0<=Q);break}}}finally{ge=!1,M.H=ie,o(),Error.prepareStackTrace=q}return Ee=(Ee=$?$.displayName||$.name:"")?a(Ee):"",typeof $=="function"&&re.set($,Ee),Ee}function s($){if($==null)return"";if(typeof $=="function"){var U=$.prototype;return l($,!(!U||!U.isReactComponent))}if(typeof $=="string")return a($);switch($){case H:return a("Suspense");case E:return a("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case R:return $=l($.render,!1),$;case I:return s($.type);case j:U=$._payload,$=$._init;try{return s($(U))}catch{}}return""}function u(){var $=M.A;return $===null?null:$.getOwner()}function c($){if(G.call($,"key")){var U=Object.getOwnPropertyDescriptor($,"key").get;if(U&&U.isReactWarning)return!1}return $.key!==void 0}function h($,U){function q(){lt||(lt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}q.isReactWarning=!0,Object.defineProperty($,"key",{get:q,configurable:!0})}function p(){var $=t(this.type);return ve[$]||(ve[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function g($,U,q,ie,Se,le){return q=le.ref,$={$$typeof:P,type:$,key:U,props:le,_owner:Se},(q!==void 0?q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:p}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function m($,U,q,ie,Se,le){if(typeof $=="string"||typeof $=="function"||$===O||$===b||$===D||$===H||$===E||$===W||typeof $=="object"&&$!==null&&($.$$typeof===j||$.$$typeof===I||$.$$typeof===V||$.$$typeof===k||$.$$typeof===R||$.$$typeof===L||$.getModuleId!==void 0)){var Q=U.children;if(Q!==void 0)if(ie)if(N(Q)){for(ie=0;ie<Q.length;ie++)f(Q[ie],$);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(Q,$)}else Q="",($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(Q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),$===null?ie="null":N($)?ie="array":$!==void 0&&$.$$typeof===P?(ie="<"+(t($.type)||"Unknown")+" />",Q=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof $,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,Q);if(G.call(U,"key")){Q=t($);var Ze=Object.keys(U).filter(function(Ee){return Ee!=="key"});ie=0<Ze.length?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}",Pn[Q+ie]||(Ze=0<Ze.length?"{"+Ze.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,ie,
|
|
27
|
+
<%s key={someKey} {...props} />`,ie,Q,Ze,Q),Pn[Q+ie]=!0)}if(Q=null,q!==void 0&&(n(q),Q=""+q),c(U)&&(n(U.key),Q=""+U.key),"key"in U){q={};for(var Bt in U)Bt!=="key"&&(q[Bt]=U[Bt])}else q=U;return Q&&h(q,typeof $=="function"?$.displayName||$.name||"Unknown":$),g($,Q,le,Se,u(),q)}function f($,U){if(typeof $=="object"&&$&&$.$$typeof!==We){if(N($))for(var q=0;q<$.length;q++){var ie=$[q];v(ie)&&y(ie,U)}else if(v($))$._store&&($._store.validated=1);else if($===null||typeof $!="object"?q=null:(q=Z&&$[Z]||$["@@iterator"],q=typeof q=="function"?q:null),typeof q=="function"&&q!==$.entries&&(q=q.call($),q!==$))for(;!($=q.next()).done;)v($.value)&&y($.value,U)}}function v($){return typeof $=="object"&&$!==null&&$.$$typeof===P}function y($,U){if($._store&&!$._store.validated&&$.key==null&&($._store.validated=1,U=C(U),!sr[U])){sr[U]=!0;var q="";$&&$._owner!=null&&$._owner!==u()&&(q=null,typeof $._owner.tag=="number"?q=t($._owner.type):typeof $._owner.name=="string"&&(q=$._owner.name),q=" It was passed a child from "+q+".");var ie=M.getCurrentStack;M.getCurrentStack=function(){var Se=s($.type);return ie&&(Se+=ie()||""),Se},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',U,q),M.getCurrentStack=ie}}function C($){var U="",q=u();return q&&(q=t(q.type))&&(U=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+q+"`."),
|
|
29
|
+
Check the render method of \``+q+"`."),U||($=t($))&&(U=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+$+">."),V}var w=d,P=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),B=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),X=Symbol.iterator,I=Symbol.for("react.client.reference"),A=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,Y=Object.assign,M=Symbol.for("react.client.reference"),R=Array.isArray,K=0,L,H,W,F,J,te,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),st,ve={},Dn={},lr={};In.Fragment=O,In.jsx=function($,V,q,ie,Se){return m($,V,q,!1,ie,Se)},In.jsxs=function($,V,q,ie,Se){return m($,V,q,!0,ie,Se)}}()),In}var Ga;function ch(){return Ga||(Ga=1,process.env.NODE_ENV==="production"?cr.exports=lh():cr.exports=uh()),cr.exports}var T=ch();const dh={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},fh={components:dh},hh={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},ph={components:hh},gh={},vh={};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Wr(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Wr(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Wr(t,...e)}function yu(){return{enUS:Wr(fh,gh),frFR:Wr(ph,vh)}}const mh=t=>{const e=yu();return T.jsx(mn.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},yh=({disabled:t,onClick:e})=>T.jsx(mn.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function De(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function bh(t){let[e,n]=d.useState(t),r=d.useRef(null),i=De(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=De(a=>{r.current=a(e),i()});return[e,o]}const Ur={prefix:String(Math.round(Math.random()*1e10)),current:0},bu=d.createContext(Ur),Sh=d.createContext(!1);let wh=!!(typeof window<"u"&&window.document&&window.document.createElement),Ii=new WeakMap;function Eh(t=!1){let e=d.useContext(bu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=Ii.get(o);a==null?Ii.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,Ii.delete(o))}n.current=++e.current}return n.current}function $h(t){let e=d.useContext(bu);e===Ur&&!wh&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Eh(!!t),r=e===Ur&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function xh(t){let e=d.useId(),[n]=d.useState($n()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ur.prefix}`;return t||`${r}-${e}`}const Ch=typeof d.useId=="function"?xh:$h;function Th(){return!1}function Dh(){return!0}function Ph(t){return()=>{}}function $n(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Ph,Th,Dh):d.useContext(Sh)}let Oh=!!(typeof window<"u"&&window.document&&window.document.createElement),ft=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Ch(e),o=d.useCallback(a=>{r.current=a},[]);return Oh&&(ft.has(i)&&!ft.get(i).includes(o)?ft.set(i,[...ft.get(i),o]):ft.set(i,[o])),pe(()=>{let a=i;return()=>{ft.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function Ih(t,e){if(t===e)return t;let n=ft.get(t);if(n)return n.forEach(i=>i(e)),e;let r=ft.get(e);return r?(r.forEach(i=>i(t)),t):e}function _i(t=[]){let e=tr(),[n,r]=bh(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Vn(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Ae=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},yn=t=>t&&"window"in t&&t.window===t?t:Ae(t).defaultView||window;function Su(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Su(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Su(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Vn(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=ot(o,a):i==="id"&&o&&a?e.id=Ih(o,a):e[i]=a!==void 0?a:o}}return e}function wu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const _h=new Set(["id"]),kh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Rh=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Nh=/^(data-.*)$/;function Be(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(_h.has(a)||n&&kh.has(a)||r&&Rh.has(a)||i!=null&&i.has(a)||Nh.test(a))&&(o[a]=t[a]);return o}function xt(t){if(Mh())t.focus({preventScroll:!0});else{let e=Ah(t);t.focus(),Lh(e)}}let dr=null;function Mh(){if(dr==null){dr=!1;try{document.createElement("div").focus({get preventScroll(){return dr=!0,!0}})}catch{}}return dr}function Ah(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Lh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ci(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function at(t){let e=null;return()=>(e==null&&(e=t()),e)}const It=at(function(){return aa(/^Mac/i)}),Kh=at(function(){return aa(/^iPhone/i)}),Eu=at(function(){return aa(/^iPad/i)||It()&&navigator.maxTouchPoints>1}),di=at(function(){return Kh()||Eu()}),Fh=at(function(){return It()||di()}),$u=at(function(){return ci(/AppleWebKit/i)&&!jh()}),jh=at(function(){return ci(/Chrome/i)}),xu=at(function(){return ci(/Android/i)}),zh=at(function(){return ci(/Firefox/i)}),Hh=d.createContext({isNative:!0,open:Wh,useHref:t=>t});function fi(){return d.useContext(Hh)}function _t(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=e;zh()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(It()?o=!0:a=!0);let u=$u()&&It()&&!Eu()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});_t.isOpening=n,xt(t),t.dispatchEvent(u),_t.isOpening=!1}_t.isOpening=!1;function Bh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function Wh(t,e){Bh(t,n=>_t(n,e))}function Cu(t){let e=fi();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let nn=new Map,Eo=new Set;function qa(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?qa():document.addEventListener("DOMContentLoaded",qa));function Uh(t){requestAnimationFrame(()=>{nn.size===0?t():Eo.add(t)})}function Tu(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function sa(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function xn(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ya(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Vh(){return typeof window.ResizeObserver<"u"}function Xa(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Vh()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Gh(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Du(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function qh(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let Yh=0;const ki=new Map;function Xh(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Yh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function fr(t,e,n,r){let i=De(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Pu(t,e){let n=Ja(t,e,"left"),r=Ja(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:h,scrollPaddingBottom:p,scrollPaddingLeft:g}=getComputedStyle(t),m=a+parseInt(u,10),f=s+parseInt(l,10),v=m+t.clientWidth,y=f+t.clientHeight,S=parseInt(c,10)||0,w=parseInt(p,10)||0,P=parseInt(h,10)||0,x=parseInt(g,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-P&&(a+=n+i-v+P),r<=f+S?s=r-parseInt(l,10)-S:r+o>y-w&&(s+=r+o-y+w),t.scrollLeft=a,t.scrollTop=s}function Ja(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Qa(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=qh(t);for(let u of l)Pu(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:h}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-h)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function $o(t){return t.mozInputSource===0&&t.isTrusted?!0:xu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Jh(t){return!xu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Qh="react-aria-clear-focus",Zh="react-aria-focus",Ou="react-aria-update-activedescendant";function rn(t){return It()?t.metaKey:t.ctrlKey}function ep(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Iu(t,i,d.useCallback(()=>r(!1),[])),i}function tp(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Iu(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Iu(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||jt.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?t:r,l=d.useCallback((u,...c)=>{let h=(p,...g)=>{n&&(Object.is(s,p)||n(p,...g)),a||(s=p)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((g,...m)=>{let f=u(a?s:g,...m);return h(f,...c),a?g:f})):(a||i(u),h(u,...c))},[a,s,n]);return[s,l]}function xo(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Za=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function yt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=t;return d.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e({...s,defaultClassName:i}):l=e,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...s,defaultChildren:o}):r==null?c=o:c=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,s])}function la(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Za])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Za;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=la(n,t.slot)||{},{ref:i,...o}=r,a=xn(d.useMemo(()=>wu(e,i),[e,i])),s=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,c={...l.defaultStyle,...u},h=typeof t.style=="function"?t.style({...l,defaultStyle:c}):t.style;return{...c,...h}}:s.style={...o.style,...t.style}),[s,a]}function np(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(e(s.textValue)||s.type==="header"){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class _u{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends _u{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class rp extends _u{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function ku(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let h=a.get(c);if(!h){h=e(c);var s,l;let p=(l=(s=h.props.id)!==null&&s!==void 0?s:c.key)!==null&&l!==void 0?l:c.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),h=d.cloneElement(h,i?{key:p,id:p,value:c}:{key:p}),a.set(c,h)}u.push(h)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Vr=d.createContext(!1),ip=typeof DocumentFragment<"u"?new DocumentFragment:null;function op(t){let e=d.useContext(Vr),n=$n();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Vr.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):jt.createPortal(r,ip)}function ap(t){let e=(n,r)=>d.useContext(Vr)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function sp(){return d.useContext(Vr)}const lp=typeof document<"u"?d.useLayoutEffect:()=>{};var hr={exports:{}},Ri={};/**
|
|
31
|
+
Check the top-level render call using <`+$+">."),U}var S=d,P=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),V=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Z=Symbol.iterator,_=Symbol.for("react.client.reference"),M=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,Y=Object.assign,L=Symbol.for("react.client.reference"),N=Array.isArray,K=0,A,z,B,F,X,te,de;r.__reactDisabledLog=!0;var ce,oe,ge=!1,re=new(typeof WeakMap=="function"?WeakMap:Map),We=Symbol.for("react.client.reference"),lt,ve={},Pn={},sr={};_n.Fragment=O,_n.jsx=function($,U,q,ie,Se){return m($,U,q,!1,ie,Se)},_n.jsxs=function($,U,q,ie,Se){return m($,U,q,!0,ie,Se)}}()),_n}var Ga;function p0(){return Ga||(Ga=1,process.env.NODE_ENV==="production"?cr.exports=f0():cr.exports=h0()),cr.exports}var w=p0();const g0={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},v0={components:g0},m0={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},y0={components:m0},b0={footer:{links:{legal:"Legal mentions",personal_data:"Personal data and cookies",accessibility:"Accessibility"},mention:"Unless otherwise stated, all content on this site is under the",license:"etalab-2.0 license"}},S0={components:b0},C0={footer:{links:{legal:"Mentions Légales",personal_data:"Données personnelles et cookies",accessibility:"Accessibilité"},mention:"Sauf mention contraire, tout le contenu de ce site est sous",license:"licence etalab-2.0"}},w0={components:C0};function Oi(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Br(t,...e){if(!e.length)return t;const n=e.shift();if(Oi(t)&&Oi(n))for(const r in n)Oi(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Br(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Br(t,...e)}function bu(){return{"en-US":Br(v0,S0),"fr-FR":Br(y0,w0)}}const E0=t=>{const e=bu();return w.jsx(_t.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},Su=({disabled:t,onClick:e})=>w.jsx(_t.Button,{disabled:t,className:"pro-connect-button",onClick:e}),pe=typeof document<"u"?d.useLayoutEffect:()=>{};function Pe(t){const e=d.useRef(null);return pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function $0(t){let[e,n]=d.useState(t),r=d.useRef(null),i=Pe(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}e===a.value?i():n(a.value)});pe(()=>{r.current&&i()});let o=Pe(a=>{r.current=a(e),i()});return[e,o]}const Wr={prefix:String(Math.round(Math.random()*1e10)),current:0},Cu=d.createContext(Wr),x0=d.createContext(!1);let T0=!!(typeof window<"u"&&window.document&&window.document.createElement),_i=new WeakMap;function P0(t=!1){let e=d.useContext(Cu),n=d.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=_i.get(o);a==null?_i.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==a.state&&(e.current=a.id,_i.delete(o))}n.current=++e.current}return n.current}function D0(t){let e=d.useContext(Cu);e===Wr&&!T0&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=P0(!!t),r=e===Wr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function O0(t){let e=d.useId(),[n]=d.useState(En()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Wr.prefix}`;return t||`${r}-${e}`}const _0=typeof d.useId=="function"?O0:D0;function I0(){return!1}function k0(){return!0}function N0(t){return()=>{}}function En(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(N0,I0,k0):d.useContext(x0)}let R0=!!(typeof window<"u"&&window.document&&window.document.createElement),ft=new Map;function tr(t){let[e,n]=d.useState(t),r=d.useRef(null),i=_0(e),o=d.useCallback(a=>{r.current=a},[]);return R0&&(ft.has(i)&&!ft.get(i).includes(o)?ft.set(i,[...ft.get(i),o]):ft.set(i,[o])),pe(()=>{let a=i;return()=>{ft.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function L0(t,e){if(t===e)return t;let n=ft.get(t);if(n)return n.forEach(i=>i(e)),e;let r=ft.get(e);return r?(r.forEach(i=>i(t)),t):e}function Ii(t=[]){let e=tr(),[n,r]=$0(e),i=d.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return pe(i,[e,i,...t]),n}function Un(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},yn=t=>t&&"window"in t&&t.window===t?t:Me(t).defaultView||window;function wu(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=wu(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=wu(t))&&(r&&(r+=" "),r+=e);return r}function ye(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Un(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=ot(o,a):i==="id"&&o&&a?e.id=L0(o,a):e[i]=a!==void 0?a:o}}return e}function Eu(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const M0=new Set(["id"]),A0=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),K0=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),F0=/^(data-.*)$/;function Ve(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(M0.has(a)||n&&A0.has(a)||r&&K0.has(a)||i!=null&&i.has(a)||F0.test(a))&&(o[a]=t[a]);return o}function $t(t){if(j0())t.focus({preventScroll:!0});else{let e=H0(t);t.focus(),z0(e)}}let dr=null;function j0(){if(dr==null){dr=!1;try{document.createElement("div").focus({get preventScroll(){return dr=!0,!0}})}catch{}}return dr}function H0(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function z0(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ci(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function aa(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function at(t){let e=null;return()=>(e==null&&(e=t()),e)}const It=at(function(){return aa(/^Mac/i)}),V0=at(function(){return aa(/^iPhone/i)}),$u=at(function(){return aa(/^iPad/i)||It()&&navigator.maxTouchPoints>1}),di=at(function(){return V0()||$u()}),B0=at(function(){return It()||di()}),xu=at(function(){return ci(/AppleWebKit/i)&&!W0()}),W0=at(function(){return ci(/Chrome/i)}),Tu=at(function(){return ci(/Android/i)}),U0=at(function(){return ci(/Firefox/i)}),G0=d.createContext({isNative:!0,open:Y0,useHref:t=>t});function fi(){return d.useContext(G0)}function kt(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:l,shiftKey:s}=e;U0()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(It()?o=!0:a=!0);let u=xu()&&It()&&!$u()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:l,shiftKey:s}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:l,shiftKey:s,bubbles:!0,cancelable:!0});kt.isOpening=n,$t(t),t.dispatchEvent(u),kt.isOpening=!1}kt.isOpening=!1;function q0(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function Y0(t,e){q0(t,n=>kt(n,e))}function Pu(t){let e=fi();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let rn=new Map,wo=new Set;function qa(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=rn.get(r.target);i||(i=new Set,rn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=rn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),rn.delete(r.target)),rn.size===0)){for(let o of wo)o();wo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?qa():document.addEventListener("DOMContentLoaded",qa));function Z0(t){requestAnimationFrame(()=>{rn.size===0?t():wo.add(t)})}function Du(){let t=d.useRef(new Map),e=d.useCallback((i,o,a,l)=>{let s=l!=null&&l.once?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:s,options:l}),i.addEventListener(o,s,l)},[]),n=d.useCallback((i,o,a,l)=>{var s;let u=((s=t.current.get(a))===null||s===void 0?void 0:s.fn)||a;i.removeEventListener(o,u,l),t.current.delete(a)},[]),r=d.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function la(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=tr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function $n(t){const e=d.useRef(null);return d.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Ya(t,e){const n=d.useRef(!0),r=d.useRef(null);pe(()=>(n.current=!0,()=>{n.current=!1}),[]),pe(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function X0(){return typeof window.ResizeObserver<"u"}function Za(t){const{ref:e,box:n,onResize:r}=t;d.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(X0()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function J0(t,e){pe(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Gn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Ou(t,e){let n=t;for(Gn(n,e)&&(n=n.parentElement);n&&!Gn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Q0(t,e){const n=[];for(;t&&t!==document.documentElement;)Gn(t,e)&&n.push(t),t=t.parentElement;return n}let e2=0;const ki=new Map;function t2(t){let[e,n]=d.useState();return pe(()=>{if(!t)return;let r=ki.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${e2++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ki.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ki.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function fr(t,e,n,r){let i=Pe(n),o=n==null;d.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o,i])}function _u(t,e){let n=Xa(t,e,"left"),r=Xa(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,l=t.scrollTop,{borderTopWidth:s,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:h,scrollPaddingBottom:p,scrollPaddingLeft:g}=getComputedStyle(t),m=a+parseInt(u,10),f=l+parseInt(s,10),v=m+t.clientWidth,y=f+t.clientHeight,C=parseInt(c,10)||0,S=parseInt(p,10)||0,P=parseInt(h,10)||0,x=parseInt(g,10)||0;n<=a+x?a=n-parseInt(u,10)-x:n+i>v-P&&(a+=n+i-v+P),r<=f+C?l=r-parseInt(s,10)-C:r+o>y-S&&(l+=r+o-y+S),t.scrollLeft=a,t.scrollTop=l}function Xa(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function Ja(t,e){if(t&&document.contains(t)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let s=Q0(t);for(let u of s)_u(u,t)}else{var n;let{left:s,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:h}=t.getBoundingClientRect();if(Math.abs(s-c)>1||Math.abs(u-h)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function Eo(t){return t.mozInputSource===0&&t.isTrusted?!0:Tu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function n2(t){return!Tu()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const r2="react-aria-clear-focus",i2="react-aria-focus",Iu="react-aria-update-activedescendant";function on(t){return It()?t.metaKey:t.ctrlKey}function o2(t,e=!0){let[n,r]=d.useState(!0),i=n&&e;return pe(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),ku(t,i,d.useCallback(()=>r(!1),[])),i}function a2(t,e){let[n,r]=d.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return ku(t,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function ku(t,e,n){pe(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Ht.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}function nr(t,e,n){let[r,i]=d.useState(t||e),o=d.useRef(t!==void 0),a=t!==void 0;d.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let l=a?t:r,s=d.useCallback((u,...c)=>{let h=(p,...g)=>{n&&(Object.is(l,p)||n(p,...g)),a||(l=p)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((g,...m)=>{let f=u(a?l:g,...m);return h(f,...c),a?g:f})):(a||i(u),h(u,...c))},[a,l,n]);return[l,s]}function $o(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const Qa=Symbol("default");function rr({values:t,children:e}){for(let[n,r]of t)e=d.createElement(n.Provider,{value:r},e);return e}function yt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:l}=t;return d.useMemo(()=>{let s,u,c;return typeof e=="function"?s=e({...l,defaultClassName:i}):s=e,typeof n=="function"?u=n({...l,defaultStyle:a||{}}):u=n,typeof r=="function"?c=r({...l,defaultChildren:o}):r==null?c=o:c=r,{className:s??i,style:u||a?{...a,...u}:void 0,children:c??o,"data-rac":""}},[e,n,r,i,o,a,l])}function sa(t,e){let n=d.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!e&&!n.slots[Qa])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=e||Qa;if(!n.slots[i])throw new Error(`Invalid slot "${e}". Valid slot names are ${r}.`);return n.slots[i]}return n}function ir(t,e,n){let r=sa(n,t.slot)||{},{ref:i,...o}=r,a=$n(d.useMemo(()=>Eu(e,i),[e,i])),l=ye(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?l.style=s=>{let u=typeof o.style=="function"?o.style(s):o.style,c={...s.defaultStyle,...u},h=typeof t.style=="function"?t.style({...s,defaultStyle:c}):t.style;return{...c,...h}}:l.style={...o.style,...t.style}),[l,a]}function l2(){let[t,e]=d.useState(!0),n=d.useRef(!1),r=d.useCallback(i=>{n.current=!0,e(!!i)},[]);return pe(()=>{n.current||e(!1)},[]),[r,t]}class ua{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new ua(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class ca{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new ca,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let l of this.getChildren(i.key))if(e(l.textValue)||l.type==="header"){let s=l.clone();a==null&&(o.firstChildKey=s.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===s.parentKey?(a.nextKey=s.key,s.prevKey=a.key):s.prevKey=null,s.nextKey=null,n.addNode(s),a=s}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else if(e(i.textValue)){let o=i.clone();n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Nu{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class qn extends Nu{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof qn?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof qn?this.parentNode.node.key:null;var a;o.prevKey=(a=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&a!==void 0?a:null;var l;o.nextKey=(l=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,o.hasChildNodes=!!this.firstChild;var s;o.firstChildKey=(s=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&s!==void 0?s:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(e,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:l,id:s,...u}=e;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=l||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",s!=null&&s!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=s}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new ua(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class s2 extends Nu{get isConnected(){return this.isMounted}createElement(e){return new qn(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let r of e)this.addNode(r)}this.markDirty(e)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof qn&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Ru(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let h=a.get(c);if(!h){h=e(c);var l,s;let p=(s=(l=h.props.id)!==null&&l!==void 0?l:c.key)!==null&&s!==void 0?s:c.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),h=d.cloneElement(h,i?{key:p,id:p,value:c}:{key:p}),a.set(c,h)}u.push(h)}return u}else if(typeof e!="function")return e},[e,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Ur=d.createContext(!1),u2=typeof DocumentFragment<"u"?new DocumentFragment:null;function c2(t){let e=d.useContext(Ur),n=En();if(e)return d.createElement(d.Fragment,null,t.children);let r=d.createElement(Ur.Provider,{value:!0},t.children);return n?d.createElement("template",{"data-react-aria-hidden":!0},r):Ht.createPortal(r,u2)}function d2(t){let e=(n,r)=>d.useContext(Ur)?null:t(n,r);return e.displayName=t.displayName||t.name,d.forwardRef(e)}function f2(){return d.useContext(Ur)}const h2=typeof document<"u"?d.useLayoutEffect:()=>{};var hr={exports:{}},Ni={};/**
|
|
32
32
|
* @license React
|
|
33
33
|
* use-sync-external-store-shim.production.js
|
|
34
34
|
*
|
|
@@ -36,7 +36,7 @@ Check the top-level render call using <`+$+">."),V}var w=d,P=Symbol.for("react.t
|
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var
|
|
39
|
+
*/var el;function p2(){if(el)return Ni;el=1;var t=d;function e(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function l(h,p){var g=p(),m=r({inst:{value:g,getSnapshot:p}}),f=m[0].inst,v=m[1];return o(function(){f.value=g,f.getSnapshot=p,s(f)&&v({inst:f})},[h,g,p]),i(function(){return s(f)&&v({inst:f}),h(function(){s(f)&&v({inst:f})})},[h]),a(g),g}function s(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!n(h,g)}catch{return!0}}function u(h,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Ni.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Ni}var Ri={};/**
|
|
40
40
|
* @license React
|
|
41
41
|
* use-sync-external-store-shim.development.js
|
|
42
42
|
*
|
|
@@ -44,12 +44,12 @@ Check the top-level render call using <`+$+">."),V}var w=d,P=Symbol.for("react.t
|
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var ts;function cp(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function t(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}function e(g,m){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var f=m();if(!h){var v=m();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}v=a({inst:{value:f,getSnapshot:m}});var y=v[0].inst,S=v[1];return l(function(){y.value=f,y.getSnapshot=m,n(y)&&S({inst:y})},[g,f,m]),s(function(){return n(y)&&S({inst:y}),g(function(){n(y)&&S({inst:y})})},[g]),u(f),f}function n(g){var m=g.getSnapshot;g=g.value;try{var f=m();return!o(g,f)}catch{return!0}}function r(g,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ni.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ni}var ns;function dp(){return ns||(ns=1,process.env.NODE_ENV==="production"?hr.exports=up():hr.exports=cp()),hr.exports}var da=dp();const Ru=d.createContext(!1),Yn=d.createContext(null);function Nu(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=gp(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(op,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(fp,{render:t.children,collection:n}))}function fp({collection:t,render:e}){return e(t)}function hp(t,e,n){let r=$n(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const pp=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:hp;function gp(t){let[e]=d.useState(()=>new rp((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=pp(n,r,i);return lp(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const Co=d.createContext(null);function vp(t,e,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(e,n,r,o)},[e,n,r,o]),s=d.useContext(Co);if(s){let l=s.ownerDocument.nodesByProps.get(e);return l||(l=s.ownerDocument.createElement(t),l.setProps(e,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,l)),i?d.createElement(Co.Provider,{value:l},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(Ru)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return vp(t,i,o,"children"in i?i.children:null,null,s=>d.createElement(n,{node:s}))});return r.displayName=e.name,r}function mp(t){return ku({...t,addIdAndValue:!0})}const rs=d.createContext(null);function Mu(t){let e=d.useContext(rs),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=mp({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(yp,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(rs.Provider,{value:e},i)}function yp({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(Ru.Provider,{value:!0},t)),[t]);return $n()?d.createElement(Co.Provider,{value:e},n):jt.createPortal(n,e)}const Pe=typeof document<"u"?d.useLayoutEffect:()=>{};function bp(t){const e=d.useRef(null);return Pe(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},gt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function is(t){if(Sp())t.focus({preventScroll:!0});else{let e=wp(t);t.focus(),Ep(e)}}let pr=null;function Sp(){if(pr==null){pr=!1;try{document.createElement("div").focus({get preventScroll(){return pr=!0,!0}})}catch{}}return pr}function wp(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Ep(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Au(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function $p(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const xp=ha(function(){return $p(/^Mac/i)}),Cp=ha(function(){return Au(/Chrome/i)}),Lu=ha(function(){return Au(/Android/i)});let on=new Map,To=new Set;function os(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);i||(i=new Set,on.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=on.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),on.delete(r.target)),on.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?os():document.addEventListener("DOMContentLoaded",os));function Tp(t){requestAnimationFrame(()=>{on.size===0?t():To.add(t)})}function Dp(t){return t.mozInputSource===0&&t.isTrusted?!0:Lu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Pp(t,e){return e.get?e.get.call(t):e.value}function Ku(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Op(t,e){var n=Ku(t,e,"get");return Pp(t,n)}function Ip(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _p(t,e,n){Ip(t,e),e.set(t,n)}function kp(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function as(t,e,n){var r=Ku(t,e,"set");return kp(t,r,n),n}let Rp=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Fu(t){let e=d.useRef({isFocused:!1,observer:null});Pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=bp(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new Rp("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Np(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Fu(o),s=d.useCallback(l=>{const u=me(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Cn=null,Do=new Set,Bn=new Map,kt=!1,Po=!1;const Mp={Tab:!0,Escape:!0};function pa(t,e){for(let n of Do)n(t,e)}function Ap(t){return!(t.metaKey||!xp()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Gr(t){kt=!0,Ap(t)&&(Cn="keyboard",pa("keyboard",t))}function Re(t){Cn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(kt=!0,pa("pointer",t))}function ju(t){Dp(t)&&(kt=!0,Cn="virtual")}function zu(t){t.target===window||t.target===document||(!kt&&!Po&&(Cn="virtual",pa("virtual",t)),kt=!1,Po=!1)}function Hu(){kt=!1,Po=!0}function Oo(t){if(typeof window>"u"||Bn.get(gt(t)))return;const e=gt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){kt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Gr,!0),n.addEventListener("keyup",Gr,!0),n.addEventListener("click",ju,!0),e.addEventListener("focus",zu,!0),e.addEventListener("blur",Hu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{Bu(t)},{once:!0}),Bn.set(e,{focus:r})}const Bu=(t,e)=>{const n=gt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Gr,!0),r.removeEventListener("keyup",Gr,!0),r.removeEventListener("click",ju,!0),n.removeEventListener("focus",zu,!0),n.removeEventListener("blur",Hu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function Lp(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>Bu(t,n)}typeof document<"u"&&Lp();function Wu(){return Cn!=="pointer"}function Uu(){return Cn}const Kp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Fp(t,e,n){var r;const i=typeof window<"u"?gt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?gt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?gt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?gt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!Kp.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof s&&!Mp[n.key])}function jp(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{Fp(!!(n!=null&&n.isTextInput),i,o)&&t(Wu())};return Do.add(r),()=>{Do.delete(r)}},e)}function zp(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Fu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}function qr(t){const e=me(t);if(Uu()==="virtual"){let n=e.activeElement;Tp(()=>{e.activeElement===n&&t.isConnected&&is(t)})}else is(t)}function Hp(t){const e=gt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:s}=o(t);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function Bp(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Vu(t,e){return t.nodeName!=="#comment"&&Hp(t)&&Bp(t,e)&&(!t.parentElement||Vu(t.parentElement,t))}const ss=d.createContext(null),Io="react-aria-focus-scope-restore";let ae=null;function Gu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(ss)||{},u=d.useMemo(()=>new ko({scopeRef:s}),[s]);Pe(()=>{let p=l||ue.root;if(ue.getTreeNode(p.scopeRef)&&ae&&!Yr(ae,p.scopeRef)){let g=ue.getTreeNode(ae);g&&(p=g)}p.addChild(u),ue.addNode(u)},[u,l]),Pe(()=>{let p=ue.getTreeNode(s);p&&(p.contain=!!n)},[n]),Pe(()=>{var p;let g=(p=o.current)===null||p===void 0?void 0:p.nextSibling,m=[],f=v=>v.stopPropagation();for(;g&&g!==a.current;)m.push(g),g.addEventListener(Io,f),g=g.nextSibling;return s.current=m,()=>{for(let v of m)v.removeEventListener(Io,f)}},[e]),Xp(s,r,n),Gp(s,n),Jp(s,r,n),Yp(s,i),d.useEffect(()=>{const p=me(s.current?s.current[0]:void 0).activeElement;let g=null;if(Ke(p,s.current)){for(let m of ue.traverse())m.scopeRef&&Ke(p,m.scopeRef.current)&&(g=m);g===ue.getTreeNode(s)&&(ae=g.scopeRef)}},[s]),Pe(()=>()=>{var p,g,m;let f=(m=(g=ue.getTreeNode(s))===null||g===void 0||(p=g.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&m!==void 0?m:null;(s===ae||Yr(s,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(s)},[s]);let c=d.useMemo(()=>Wp(s),[]),h=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(ss.Provider,{value:h},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function Wp(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[0].previousElementSibling,u=Ct(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Ke(s,n)?s:l;let h=c.nextNode();return!h&&o&&(c.currentNode=l,h=c.nextNode()),h&&rt(h,!0),h},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,s=r||me(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Ct(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Ke(s,n)?s:l;let h=c.previousNode();return!h&&o&&(c.currentNode=l,h=c.previousNode()),h&&rt(h,!0),h},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Ct(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&rt(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Ct(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&rt(s,!0),s}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Up=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Vp=ga.join(':not([hidden]):not([tabindex="-1"]),');function Ct(t){return t[0].parentElement}function Ln(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Gp(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);Pe(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Ln(t)||u.isComposing)return;let c=o.activeElement,h=t.current;if(!h||!Ke(c,h))return;let p=Ct(h),g=qe(p,{tabbable:!0},h);if(!c)return;g.currentNode=c;let m=u.shiftKey?g.previousNode():g.nextNode();m||(g.currentNode=u.shiftKey?h[h.length-1].nextElementSibling:h[0].previousElementSibling,m=u.shiftKey?g.previousNode():g.nextNode()),u.preventDefault(),m&&rt(m,!0)},s=u=>{(!ae||Yr(ae,t))&&Ke(u.target,t.current)?(ae=t,n.current=u.target):Ln(t)&&!vt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&_o(ae.current):Ln(t)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Uu();if(!((c==="virtual"||c===null)&&Lu()&&Cp())&&o.activeElement&&Ln(t)&&!vt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var p;n.current=u.target,(p=n.current)===null||p===void 0||p.focus()}else ae.current&&_o(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[t,e]),Pe(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function qu(t){return vt(t)}function Ke(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function vt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Ke(t,n.current))return!0;return!1}function qp(t){return vt(t,ae)}function Yr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{qr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Yu(t,e=!0){let n=t[0].previousElementSibling,r=Ct(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=Ct(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function _o(t,e=!0){rt(Yu(t,e))}function Yp(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Ke(r.activeElement,ae.current)&&t.current&&_o(t.current)}n.current=!1},[t])}function Xp(t,e,n){Pe(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let s=a.target;Ke(s,t.current)?ae=t:qu(s)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function ls(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Jp(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);Pe(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||Yr(ae,t))&&Ke(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[t,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ln(t)||a.isComposing)return;let s=i.activeElement;if(!vt(s,t)||!ls(t))return;let l=ue.getTreeNode(t);if(!l)return;let u=l.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=s;let h=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!h||!vt(h,t))&&u){c.currentNode=u;do h=a.shiftKey?c.previousNode():c.nextNode();while(vt(h,t));a.preventDefault(),a.stopPropagation(),h?rt(h,!0):qu(u)?rt(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Pe(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=ue.getTreeNode(t);if(!s)return;let l=s.nodeToRestore;if(e&&l&&(i.activeElement&&vt(i.activeElement,t)||i.activeElement===i.body&&ls(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){us(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let h=Yu(c.scopeRef.current,!0);us(h);return}c=c.parent}}})}}}},[t,e])}function us(t){t.dispatchEvent(new CustomEvent(Io,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?Vp:Up,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Vu(o)&&(!n||Ke(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Ke(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function hi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Wu()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(g=>{i.current.isFocused=g,a(g),u()},[u]);jp(g=>{i.current.isFocusVisible=g,u()},[],{isTextInput:n});let{focusProps:h}=Np({isDisabled:r,onFocusChange:c}),{focusWithinProps:p}=zp({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:s,focusProps:r?p:h}}function Qp(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return Pe(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let s=qe(t.current,{tabbable:!0});i(!!s.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let ln="default",Ro="",kr=new WeakMap;function cs(t){if(di()){if(ln==="default"){const e=Ae(t);Ro=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ln="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(kr.set(t,t.style.userSelect),t.style.userSelect="none")}function gr(t){if(di()){if(ln!=="disabled")return;ln="restoring",setTimeout(()=>{Uh(()=>{if(ln==="restoring"){const e=Ae(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Ro||""),Ro="",ln="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&kr.has(t)){let e=kr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),kr.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function Zp(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return Gh(e,t.ref),t}var vr=new WeakMap;class mr{continuePropagation(){as(this,vr,!1)}get shouldStopPropagation(){return Op(this,vr)}constructor(e,n,r,i){_p(this,vr,{writable:!0,value:void 0}),as(this,vr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,c,h=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,h=r.clientY),s&&(c!=null&&h!=null?(l=c-s.left,u=h-s.top):(l=s.width/2,u=s.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const ds=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:h,...p}=Zp(t),[g,m]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:y}=Tu(),S=De((b,k)=>{let B=f.current;if(a||B.didFirePressStart)return!1;let N=!0;if(B.isTriggeringEvent=!0,r){let z=new mr("pressstart",k,b);r(z),N=z.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,m(!0),N}),w=De((b,k,B=!0)=>{let N=f.current;if(!N.didFirePressStart)return!1;N.ignoreClickAfterPress=!0,N.didFirePressStart=!1,N.isTriggeringEvent=!0;let z=!0;if(i){let E=new mr("pressend",k,b);i(E),z=E.shouldStopPropagation}if(n&&n(!1),m(!1),e&&B&&!a){let E=new mr("press",k,b);e(E),z&&(z=E.shouldStopPropagation)}return N.isTriggeringEvent=!1,z}),P=De((b,k)=>{let B=f.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let N=new mr("pressup",k,b);return o(N),B.isTriggeringEvent=!1,N.shouldStopPropagation}return!0}),x=De(b=>{let k=f.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&w(Qe(k.target,b),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,y(),c||gr(k.target))}),O=De(b=>{u&&x(b)}),D=d.useMemo(()=>{let b=f.current,k={onKeyDown(N){if(Mi(N.nativeEvent,N.currentTarget)&&N.currentTarget.contains(N.target)){var z;hs(N.target,N.key)&&N.preventDefault();let E=!0;if(!b.isPressed&&!N.repeat){b.target=N.currentTarget,b.isPressed=!0,E=S(N,"keyboard");let _=N.currentTarget,j=U=>{Mi(U,_)&&!U.repeat&&_.contains(U.target)&&b.target&&P(Qe(b.target,U),"keyboard")};v(Ae(N.currentTarget),"keyup",Vn(j,B),!0)}E&&N.stopPropagation(),N.metaKey&&It()&&((z=b.metaKeyEvents)===null||z===void 0||z.set(N.key,N.nativeEvent))}else N.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(N){if(!(N&&!N.currentTarget.contains(N.target))&&N&&N.button===0&&!b.isTriggeringEvent&&!_t.isOpening){let z=!0;if(a&&N.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||$o(N.nativeEvent))){!a&&!l&&xt(N.currentTarget);let E=S(N,"virtual"),_=P(N,"virtual"),j=w(N,"virtual");z=E&&_&&j}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,z&&N.stopPropagation()}}},B=N=>{var z;if(b.isPressed&&b.target&&Mi(N,b.target)){var E;hs(N.target,N.key)&&N.preventDefault();let j=N.target;w(Qe(b.target,N),"keyboard",b.target.contains(j)),y(),N.key!=="Enter"&&ba(b.target)&&b.target.contains(j)&&!N[ds]&&(N[ds]=!0,_t(b.target,N,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(N.key)}else if(N.key==="Meta"&&(!((z=b.metaKeyEvents)===null||z===void 0)&&z.size)){var _;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let U of j.values())(_=b.target)===null||_===void 0||_.dispatchEvent(new KeyboardEvent("keyup",U))}};if(typeof PointerEvent<"u"){k.onPointerDown=_=>{if(_.button!==0||!_.currentTarget.contains(_.target))return;if(Jh(_.nativeEvent)){b.pointerType="virtual";return}Li(_.currentTarget)&&_.preventDefault(),b.pointerType=_.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=_.pointerId,b.target=_.currentTarget,!a&&!l&&xt(_.currentTarget),c||cs(b.target),j=S(_,b.pointerType);let U=_.target;"releasePointerCapture"in U&&U.releasePointerCapture(_.pointerId),v(Ae(_.currentTarget),"pointerup",N,!1),v(Ae(_.currentTarget),"pointercancel",E,!1)}j&&_.stopPropagation()},k.onMouseDown=_=>{_.currentTarget.contains(_.target)&&_.button===0&&(Li(_.currentTarget)&&_.preventDefault(),_.stopPropagation())},k.onPointerUp=_=>{!_.currentTarget.contains(_.target)||b.pointerType==="virtual"||_.button===0&&P(_,b.pointerType||_.pointerType)},k.onPointerEnter=_=>{_.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,S(Qe(b.target,_),b.pointerType))},k.onPointerLeave=_=>{_.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,w(Qe(b.target,_),b.pointerType,!1),O(_))};let N=_=>{_.pointerId===b.activePointerId&&b.isPressed&&_.button===0&&b.target&&(b.target.contains(_.target)&&b.pointerType!=null?w(Qe(b.target,_),b.pointerType):b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,_),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,y(),c||gr(b.target),"ontouchend"in b.target&&_.pointerType!=="mouse"&&v(b.target,"touchend",z,{once:!0}))},z=_=>{Xu(_.currentTarget)&&_.preventDefault()},E=_=>{x(_)};k.onDragStart=_=>{_.currentTarget.contains(_.target)&&x(_)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Li(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=$o(E.nativeEvent)?"virtual":"mouse",!a&&!l&&xt(E.currentTarget),S(E,b.pointerType)&&E.stopPropagation(),v(Ae(E.currentTarget),"mouseup",N,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let _=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,_=S(E,b.pointerType)),_&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let _=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,_=w(E,b.pointerType,!1),O(E)),_&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&P(E,b.pointerType||"mouse")};let N=E=>{if(E.button===0){if(b.isPressed=!1,y(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Ai(E,b.target)&&b.pointerType!=null?w(Qe(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&w(Qe(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let _=eg(E.nativeEvent);if(!_)return;b.activePointerId=_.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!l&&xt(E.currentTarget),c||cs(b.target),S(ut(b.target,E),b.pointerType)&&E.stopPropagation(),v(yn(E.currentTarget),"scroll",z,!0)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let _=fs(E.nativeEvent,b.activePointerId),j=!0;_&&Ai(_,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,j=S(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,j=w(ut(b.target,E),b.pointerType,!1),O(ut(b.target,E))),j&&E.stopPropagation()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let _=fs(E.nativeEvent,b.activePointerId),j=!0;_&&Ai(_,E.currentTarget)&&b.pointerType!=null?(P(ut(b.target,E),b.pointerType),j=w(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(j=w(ut(b.target,E),b.pointerType,!1)),j&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&gr(b.target),y()},k.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(ut(b.target,E)))};let z=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,l,y,c,x,O,w,S,P]);return d.useEffect(()=>()=>{var b;c||gr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:s||g,pressProps:ye(p,D)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Mi(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof yn(i).HTMLInputElement&&!Ju(i,n)||i instanceof yn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function eg(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function fs(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function ut(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Qe(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function tg(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function ng(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ai(t,e){let n=e.getBoundingClientRect(),r=tg(t);return ng(n,r)}function Li(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Xu(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function hs(t,e){return t instanceof HTMLInputElement?!Ju(t,e):Xu(t)}const rg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ju(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":rg.has(t.type)}function ig({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class og{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Qu(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=De(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new og("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function ag(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Qu(o),s=d.useCallback(l=>{const u=Ae(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?s:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Tn=null,sg=new Set,Wn=new Map,Rt=!1,No=!1;function Sa(t,e){for(let n of sg)n(t,e)}function lg(t){return!(t.metaKey||!It()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Xr(t){Rt=!0,lg(t)&&(Tn="keyboard",Sa("keyboard",t))}function Ne(t){Tn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Rt=!0,Sa("pointer",t))}function Zu(t){$o(t)&&(Rt=!0,Tn="virtual")}function ec(t){t.target===window||t.target===document||(!Rt&&!No&&(Tn="virtual",Sa("virtual",t)),Rt=!1,No=!1)}function tc(){Rt=!1,No=!0}function ps(t){if(typeof window>"u"||Wn.get(yn(t)))return;const e=yn(t),n=Ae(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Rt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xr,!0),n.addEventListener("keyup",Xr,!0),n.addEventListener("click",Zu,!0),e.addEventListener("focus",ec,!0),e.addEventListener("blur",tc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{nc(t)},{once:!0}),Wn.set(e,{focus:r})}const nc=(t,e)=>{const n=yn(t),r=Ae(t);e&&r.removeEventListener("DOMContentLoaded",e),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Xr,!0),r.removeEventListener("keyup",Xr,!0),r.removeEventListener("click",Zu,!0),n.removeEventListener("focus",ec,!0),n.removeEventListener("blur",tc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Wn.delete(n))};function ug(t){const e=Ae(t);let n;return e.readyState!=="loading"?ps(t):(n=()=>{ps(t)},e.addEventListener("DOMContentLoaded",n)),()=>nc(t,n)}typeof document<"u"&&ug();function cg(){return Tn!=="pointer"}function gs(){return Tn}function rc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Qu(a),l=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let Jr=!1,Ki=0;function Mo(){Jr=!0,setTimeout(()=>{Jr=!1},50)}function vs(t){t.pointerType==="touch"&&Mo()}function dg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",vs):document.addEventListener("touchend",Mo),Ki++,()=>{Ki--,!(Ki>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",vs):document.removeEventListener("touchend",Mo))}}function wa(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(dg,[]);let{hoverProps:l,triggerHoverEnd:u}=d.useMemo(()=>{let c=(g,m)=>{if(s.pointerType=m,i||m==="touch"||s.isHovered||!g.currentTarget.contains(g.target))return;s.isHovered=!0;let f=g.currentTarget;s.target=f,e&&e({type:"hoverstart",target:f,pointerType:m}),n&&n(!0),a(!0)},h=(g,m)=>{if(s.pointerType="",s.target=null,m==="touch"||!s.isHovered)return;s.isHovered=!1;let f=g.currentTarget;r&&r({type:"hoverend",target:f,pointerType:m}),n&&n(!1),a(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Jr&&g.pointerType==="mouse"||c(g,g.pointerType)},p.onPointerLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):(p.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!s.ignoreEmulatedMouseEvents&&!Jr&&c(g,"mouse"),s.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:p,triggerHoverEnd:h}},[e,n,r,i,s]);return d.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function fg(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=De(l=>{n&&yr(l,e)&&(i&&i(l),o.current.isPointerDown=!0)}),s=De(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=e.current,c=Ae(u);if(typeof PointerEvent<"u"){let h=p=>{l.isPointerDown&&yr(p,e)&&s(p),l.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",h,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",h,!0)}}else{let h=g=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&yr(g,e)&&s(g),l.isPointerDown=!1},p=g=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&yr(g,e)&&s(g),l.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",h,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",p,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",h,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",p,!0)}}},[e,r,a,s])}function yr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function ms(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function hg(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:ms(t.onKeyDown),onKeyUp:ms(t.onKeyUp)}}}const pg=500;function gg(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=pg,accessibilityDescription:a}=t;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=Tu(),{pressProps:c}=ya({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n({...p,type:"longpressstart"}),s.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...p,type:"longpress"}),s.current=void 0},o),p.pointerType==="touch")){let g=m=>{m.preventDefault()};l(p.target,"contextmenu",g,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(p.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(p){s.current&&clearTimeout(s.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r({...p,type:"longpressend"})}}),h=Xh(i&&!e?a:void 0);return{longPressProps:ye(c,h)}}const vg=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mg=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yg(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return vg.has(n.script)}let e=t.split("-")[0];return mg.has(e)}const bg=Symbol.for("react-aria.i18n.locale");function ic(){let t=typeof window<"u"&&window[bg]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:yg(t)?"rtl":"ltr"}}let Ao=ic(),Kn=new Set;function ys(){Ao=ic();for(let t of Kn)t(Ao)}function Sg(){let t=$n(),[e,n]=d.useState(Ao);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",ys),Kn.add(n),()=>{Kn.delete(n),Kn.size===0&&window.removeEventListener("languagechange",ys)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const wg=d.createContext(null);function or(){let t=Sg();return d.useContext(wg)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function oc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Eg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const $g=Symbol.for("react-aria.i18n.locale"),xg=Symbol.for("react-aria.i18n.strings");let Wt;class pi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=Cg(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[$g];if(Wt===void 0){let i=window[xg];if(!i)return null;Wt={};for(let o in i)Wt[o]=new pi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function Cg(t,e,n="en-US"){if(e[t])return e[t];let r=Tg(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Tg(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const bs=new Map,Ss=new Map;class Dg{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=bs.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),bs.set(o,a));let s=a.select(e);return i=n[s]||n.other,typeof i=="function"?i():i}number(e){let n=Ss.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Ss.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const ws=new WeakMap;function Pg(t){let e=ws.get(t);return e||(e=new pi(t),ws.set(t,e)),e}function Og(t,e){return e&&pi.getGlobalDictionaryForPackage(e)||Pg(t)}function Ig(t,e){let{locale:n}=or(),r=Og(t,e);return d.useMemo(()=>new Dg(n,r),[n,r])}let Fi=new Map;function _g(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const Es={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function kg(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=rc({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?e:e?{...Es,...e}:Es,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Rg(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=kg(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Qr={top:"bottom",bottom:"top",left:"right",right:"left"},Ng={top:"left",left:"top"},Lo={top:"height",left:"width"},ac={width:"totalWidth",height:"totalHeight"},br={};let fe=typeof document<"u"?window.visualViewport:null;function $s(t){let e=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=fe==null?void 0:fe.scale)!==null&&l!==void 0?l:1)>1;if(t.tagName==="BODY"){let m=document.documentElement;r=m.clientWidth,i=m.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var h;n=(h=fe==null?void 0:fe.height)!==null&&h!==void 0?h:i,s.top=m.scrollTop||t.scrollTop,s.left=m.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=fn(t)),s.top=t.scrollTop,s.left=t.scrollLeft,r=e,i=n;if($u()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){s.top=0,s.left=0;var p;o=(p=fe==null?void 0:fe.pageTop)!==null&&p!==void 0?p:0;var g;a=(g=fe==null?void 0:fe.pageLeft)!==null&&g!==void 0?g:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function Mg(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function xs(t,e,n,r,i,o,a){var s;let l=(s=i.scroll[t])!==null&&s!==void 0?s:0,u=r[Lo[t]],c=r.scroll[Ye[t]]+o,h=u+r.scroll[Ye[t]]-o,p=e-l+a[t]-r[Ye[t]],g=e-l+n+a[t]-r[Ye[t]];return p<c?c-p:g>h?Math.max(h-g,c-p):0}function Ag(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Cs(t){if(br[t])return br[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=Ng[r];Ye[n]||(n="center");let o=Lo[r],a=Lo[i];return br[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},br[t]}function ji(t,e,n,r,i,o,a,s,l,u){let{placement:c,crossPlacement:h,axis:p,crossAxis:g,size:m,crossSize:f}=r,v={};var y;v[g]=(y=t[g])!==null&&y!==void 0?y:0;var S,w,P,x;h==="center"?v[g]+=(((S=t[f])!==null&&S!==void 0?S:0)-((w=n[f])!==null&&w!==void 0?w:0))/2:h!==g&&(v[g]+=((P=t[f])!==null&&P!==void 0?P:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[g]+=o;const O=t[g]-n[f]+l+u,D=t[g]+t[f]-l-u;if(v[g]=xo(v[g],O,D),c===p){const b=s?a[m]:e[ac[m]];v[Qr[p]]=Math.floor(b-t[p]+i)}else v[p]=Math.floor(t[p]+t[m]+i);return v}function Lg(t,e,n,r,i,o,a,s){const l=r?n.height:e[ac.height];var u;let c=t.top!=null?n.top+t.top:n.top+(l-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var h,p,g,m,f,v;let y=s!=="top"?Math.max(0,e.height+e.top+((h=e.scroll.top)!==null&&h!==void 0?h:0)-c-(((p=i.top)!==null&&p!==void 0?p:0)+((g=i.bottom)!==null&&g!==void 0?g:0)+o)):Math.max(0,c+a-(e.top+((m=e.scroll.top)!==null&&m!==void 0?m:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,y)}function Ts(t,e,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,c;if(a===s)return Math.max(0,n[s]-t[s]-((u=t.scroll[s])!==null&&u!==void 0?u:0)+e[s]-((c=r[s])!==null&&c!==void 0?c:0)-r[Qr[s]]-i);var h;return Math.max(0,t[l]+t[s]+t.scroll[s]-e[s]-n[s]-n[l]-((h=r[s])!==null&&h!==void 0?h:0)-r[Qr[s]]-i)}function Kg(t,e,n,r,i,o,a,s,l,u,c,h,p,g,m,f){let v=Cs(t),{size:y,crossAxis:S,crossSize:w,placement:P,crossPlacement:x}=v,O=ji(e,s,n,v,c,h,u,p,m,f),D=c,b=Ts(s,u,e,i,o+c,v);if(a&&r[y]>b){let K=Cs(`${Qr[P]} ${x}`),L=ji(e,s,n,K,c,h,u,p,m,f);Ts(s,u,e,i,o+c,K)>b&&(v=K,O=L,D=c)}let k="bottom";v.axis==="top"?v.placement==="top"?k="top":v.placement==="bottom"&&(k="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?k="bottom":v.crossPlacement==="bottom"&&(k="top"));let B=xs(S,O[S],n[w],s,l,o,u);O[S]+=B;let N=Lg(O,s,u,p,i,o,n.height,k);g&&g<N&&(N=g),n.height=Math.min(n.height,N),O=ji(e,s,n,v,D,h,u,p,m,f),B=xs(S,O[S],n[w],s,l,o,u),O[S]+=B;let z={},E=e[S]+.5*e[w]-O[S]-i[Ye[S]];const _=m/2+f;var j,U,X,I;const A=Ye[S]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((U=i.right)!==null&&U!==void 0?U:0):((X=i.top)!==null&&X!==void 0?X:0)+((I=i.bottom)!==null&&I!==void 0?I:0),G=n[w]-A-m/2-f,Y=e[S]+m/2-(O[S]+i[Ye[S]]),M=e[S]+e[w]-m/2-(O[S]+i[Ye[S]]),R=xo(E,Y,M);return z[S]=xo(R,_,G),{position:O,maxHeight:N,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:v.placement}}function Fg(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:c,arrowSize:h=0,arrowBoundaryOffset:p=0}=t,g=r instanceof HTMLElement?jg(r):document.documentElement,m=g===document.documentElement;const f=window.getComputedStyle(g).position;let v=!!f&&f!=="static",y=m?fn(n):Ds(n,g);if(!m){let{marginTop:z,marginLeft:E}=window.getComputedStyle(n);y.top+=parseInt(z,10)||0,y.left+=parseInt(E,10)||0}let S=fn(r),w=Ag(r);var P,x;S.width+=((P=w.left)!==null&&P!==void 0?P:0)+((x=w.right)!==null&&x!==void 0?x:0);var O,D;S.height+=((O=w.top)!==null&&O!==void 0?O:0)+((D=w.bottom)!==null&&D!==void 0?D:0);let b=Mg(i),k=$s(s),B=$s(g),N=s.tagName==="BODY"?fn(g):Ds(g,s);return g.tagName==="HTML"&&s.tagName==="BODY"&&(B.scroll.top=0,B.scroll.left=0),Kg(e,y,S,b,w,o,a,k,B,N,l,u,v,c,h,p)}function fn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:e+o-s,left:n+a-l,width:r,height:i}}function Ds(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=fn(t);let i=fn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function jg(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Ps(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Ps(e);)e=e.parentElement;return e||document.documentElement}function Ps(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const zg=new WeakMap;function Hg(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||zg.get(e.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let le=typeof document<"u"?window.visualViewport:null;function Bg(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:h=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:m,maxHeight:f,arrowBoundaryOffset:v=0}=t,[y,S]=d.useState(null),w=[p,a,i.current,r.current,o.current,s,l,u,c,h,g,e,f,v,n],P=d.useRef(le==null?void 0:le.scale);d.useEffect(()=>{g&&(P.current=le==null?void 0:le.scale)},[g]);let x=d.useCallback(()=>{if(p===!1||!g||!i.current||!r.current||!u||(le==null?void 0:le.scale)!==P.current)return;let B=null;if(o.current&&o.current.contains(document.activeElement)){var N;let I=(N=document.activeElement)===null||N===void 0?void 0:N.getBoundingClientRect(),A=o.current.getBoundingClientRect();var z;if(B={type:"top",offset:((z=I==null?void 0:I.top)!==null&&z!==void 0?z:0)-A.top},B.offset>A.height/2){B.type="bottom";var E;B.offset=((E=I==null?void 0:I.bottom)!==null&&E!==void 0?E:0)-A.bottom}}let _=i.current;if(!f&&i.current){var j;_.style.top="0px",_.style.bottom="";var U;_.style.maxHeight=((U=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&U!==void 0?U:window.innerHeight)+"px"}let X=Fg({placement:Ug(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:h,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(X.position){if(_.style.top="",_.style.bottom="",_.style.left="",_.style.right="",Object.keys(X.position).forEach(I=>_.style[I]=X.position[I]+"px"),_.style.maxHeight=X.maxHeight!=null?X.maxHeight+"px":"",B&&document.activeElement&&o.current){let I=document.activeElement.getBoundingClientRect(),A=o.current.getBoundingClientRect(),G=I[B.type]-A[B.type];o.current.scrollTop+=G-B.offset}S(X)}},w);pe(x,w),Wg(x),Xa({ref:i,onResize:x}),Xa({ref:r,onResize:x});let O=d.useRef(!1);pe(()=>{let B,N=()=>{O.current=!0,clearTimeout(B),B=setTimeout(()=>{O.current=!1},500),x()},z=()=>{O.current&&N()};return le==null||le.addEventListener("resize",N),le==null||le.addEventListener("scroll",z),()=>{le==null||le.removeEventListener("resize",N),le==null||le.removeEventListener("scroll",z)}},[x]);let D=d.useCallback(()=>{O.current||m==null||m()},[m,O]);Hg({triggerRef:r,isOpen:g,onClose:m&&D});var b,k;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...y==null?void 0:y.position,maxHeight:(b=y==null?void 0:y.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(k=y==null?void 0:y.placement)!==null&&k!==void 0?k:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:y==null?void 0:y.arrowOffsetLeft,top:y==null?void 0:y.arrowOffsetTop}},updatePosition:x}}function Wg(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Ug(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ze=[];function Vg(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=t;d.useEffect(()=>(i&&Ze.push(e),()=>{let m=Ze.indexOf(e);m>=0&&Ze.splice(m,1)}),[i,e]);let l=()=>{Ze[Ze.length-1]===e&&n&&n()},u=m=>{(!s||s(m.target))&&Ze[Ze.length-1]===e&&(m.stopPropagation(),m.preventDefault())},c=m=>{(!s||s(m.target))&&(Ze[Ze.length-1]===e&&(m.stopPropagation(),m.preventDefault()),l())},h=m=>{m.key==="Escape"&&!a&&!m.nativeEvent.isComposing&&(m.stopPropagation(),m.preventDefault(),l())};fg({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=rc({isDisabled:!r,onBlurWithin:m=>{!m.relatedTarget||qp(m.relatedTarget)||(!s||s(m.relatedTarget))&&(n==null||n())}}),g=m=>{m.target===m.currentTarget&&m.preventDefault()};return{overlayProps:{onKeyDown:h,...p},underlayProps:{onPointerDown:g}}}const zi=typeof document<"u"&&window.visualViewport,Gg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Sr=0,Hi;function qg(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return Sr++,Sr===1&&(di()?Hi=Xg():Hi=Yg()),()=>{Sr--,Sr===0&&Hi()}},[e])}function Yg(){return Vn(un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"))}function Xg(){let t,e,n=u=>{t=Du(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=un(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;Jg(c)&&(s(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",zi&&(zi.height<window.innerHeight?requestAnimationFrame(()=>{Os(c)}):zi.addEventListener("resize",()=>Os(c),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,h=window.pageYOffset;a=Vn(_n(window,"scroll",u),un(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),un(document.documentElement,"overflow","hidden"),un(document.body,"marginTop",`-${h}px`),()=>{window.scrollTo(c,h)}),window.scrollTo(0,0)},l=Vn(_n(document,"touchstart",n,{passive:!1,capture:!0}),_n(document,"touchmove",r,{passive:!1,capture:!0}),_n(document,"touchend",i,{passive:!1,capture:!0}),_n(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),l()}}function un(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function _n(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Os(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Du(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function Jg(t){return t instanceof HTMLInputElement&&!Gg.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var sc={};sc={dismiss:"تجاهل"};var lc={};lc={dismiss:"Отхвърляне"};var uc={};uc={dismiss:"Odstranit"};var cc={};cc={dismiss:"Luk"};var dc={};dc={dismiss:"Schließen"};var fc={};fc={dismiss:"Απόρριψη"};var hc={};hc={dismiss:"Dismiss"};var pc={};pc={dismiss:"Descartar"};var gc={};gc={dismiss:"Lõpeta"};var vc={};vc={dismiss:"Hylkää"};var mc={};mc={dismiss:"Rejeter"};var yc={};yc={dismiss:"התעלם"};var bc={};bc={dismiss:"Odbaci"};var Sc={};Sc={dismiss:"Elutasítás"};var wc={};wc={dismiss:"Ignora"};var Ec={};Ec={dismiss:"閉じる"};var $c={};$c={dismiss:"무시"};var xc={};xc={dismiss:"Atmesti"};var Cc={};Cc={dismiss:"Nerādīt"};var Tc={};Tc={dismiss:"Lukk"};var Dc={};Dc={dismiss:"Negeren"};var Pc={};Pc={dismiss:"Zignoruj"};var Oc={};Oc={dismiss:"Descartar"};var Ic={};Ic={dismiss:"Dispensar"};var _c={};_c={dismiss:"Revocare"};var kc={};kc={dismiss:"Пропустить"};var Rc={};Rc={dismiss:"Zrušiť"};var Nc={};Nc={dismiss:"Opusti"};var Mc={};Mc={dismiss:"Odbaci"};var Ac={};Ac={dismiss:"Avvisa"};var Lc={};Lc={dismiss:"Kapat"};var Kc={};Kc={dismiss:"Скасувати"};var Fc={};Fc={dismiss:"取消"};var jc={};jc={dismiss:"關閉"};var zc={};zc={"ar-AE":sc,"bg-BG":lc,"cs-CZ":uc,"da-DK":cc,"de-DE":dc,"el-GR":fc,"en-US":hc,"es-ES":pc,"et-EE":gc,"fi-FI":vc,"fr-FR":mc,"he-IL":yc,"hr-HR":bc,"hu-HU":Sc,"it-IT":wc,"ja-JP":Ec,"ko-KR":$c,"lt-LT":xc,"lv-LV":Cc,"nb-NO":Tc,"nl-NL":Dc,"pl-PL":Pc,"pt-BR":Oc,"pt-PT":Ic,"ro-RO":_c,"ru-RU":kc,"sk-SK":Rc,"sl-SI":Nc,"sr-SP":Mc,"sv-SE":Ac,"tr-TR":Lc,"uk-UA":Kc,"zh-CN":Fc,"zh-TW":jc};function Qg(t){return t&&t.__esModule?t.default:t}function Is(t){let{onDismiss:e,...n}=t,r=Ig(Qg(zc),"@react-aria/overlays"),i=sa(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Rg,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let kn=new WeakMap,Ie=[];function Zg(t,e=document.body){let n=new Set(t),r=new Set,i=l=>{for(let p of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(p);let u=p=>{if(n.has(p)||p.parentElement&&r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let g of n)if(p.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),h=u(l);if(h===NodeFilter.FILTER_ACCEPT&&o(l),h!==NodeFilter.FILTER_REJECT){let p=c.nextNode();for(;p!=null;)o(p),p=c.nextNode()}},o=l=>{var u;let c=(u=kn.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),kn.set(l,c+1))};Ie.length&&Ie[Ie.length-1].disconnect(),i(e);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let s={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ie.push(s),()=>{a.disconnect();for(let l of r){let u=kn.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),kn.delete(l)):kn.set(l,u-1))}s===Ie[Ie.length-1]?(Ie.pop(),Ie.length&&Ie[Ie.length-1].observe()):Ie.splice(Ie.indexOf(s),1)}}function ev(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=t,{overlayProps:l,underlayProps:u}=Vg({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:h,placement:p}=Bg({...s,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return qg({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return Zg([r.current])},[i,e.isOpen,r]),{popoverProps:ye(l,c),arrowProps:h,underlayProps:u,placement:p}}const tv=d.createContext({});function nv(){var t;return(t=d.useContext(tv))!==null&&t!==void 0?t:{}}const rv=d.createContext(null);function iv(t){let e=$n(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=nv();if(!t.portalContainer&&s&&(n=s()),!n)return null;let l=t.children;return t.disableFocusManagement||(l=d.createElement(Gu,{restoreFocus:!0,contain:i&&!r},l)),l=d.createElement(rv.Provider,{value:a},d.createElement(ig,null,l)),jt.createPortal(l,n)}function Ko(t){return Fh()?t.altKey:t.ctrlKey}const ov=1e3;function av(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=sv(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,e.getKeyForSearch!=null){let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},ov)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function sv(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Hc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:h=!1,isVirtualized:p,scrollRef:g=r,linkBehavior:m="action"}=t,{direction:f}=or(),v=fi(),y=E=>{var _;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((_=r.current)===null||_===void 0)&&_.contains(E.target)))return;const j=(F,J)=>{if(F!=null){if(e.isLink(F)&&m==="selection"&&l&&!Ko(E)){var te;jt.flushSync(()=>{e.setFocusedKey(F,J)});let de=(te=g.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(F.toString())}"]`),ce=e.getItemProps(F);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(F,J),e.isLink(F)&&m==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&!Ko(E)&&e.replaceSelection(F)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var U,X,I;let F=e.focusedKey!=null?(U=n.getKeyBelow)===null||U===void 0?void 0:U.call(n,e.focusedKey):(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n);F==null&&o&&(F=(I=n.getFirstKey)===null||I===void 0?void 0:I.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowUp":if(n.getKeyAbove){var A,G,Y;let F=e.focusedKey!=null?(A=n.getKeyAbove)===null||A===void 0?void 0:A.call(n,e.focusedKey):(G=n.getLastKey)===null||G===void 0?void 0:G.call(n);F==null&&o&&(F=(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowLeft":if(n.getKeyLeftOf){var M,R,K;let F=e.focusedKey!=null?(M=n.getKeyLeftOf)===null||M===void 0?void 0:M.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(R=n.getFirstKey)===null||R===void 0?void 0:R.call(n,e.focusedKey):(K=n.getLastKey)===null||K===void 0?void 0:K.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var L,H,W;let F=e.focusedKey!=null?(L=n.getKeyRightOf)===null||L===void 0?void 0:L.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,e.focusedKey):(W=n.getFirstKey)===null||W===void 0?void 0:W.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getFirstKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getLastKey(e.focusedKey,rn(E));e.setFocusedKey(F),F!=null&&(rn(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let F=n.getKeyPageBelow(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let F=n.getKeyPageAbove(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"a":rn(E)&&e.selectionMode==="multiple"&&s!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!h){if(E.shiftKey)r.current.focus();else{let F=qe(r.current,{tabbable:!0}),J,te;do te=F.lastChild(),te&&(J=te);while(te);J&&!J.contains(document.activeElement)&&xt(J)}break}}},S=d.useRef({top:0,left:0});fr(g,"scroll",p?void 0:()=>{var E,_,j,U;S.current={top:(j=(E=g.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(U=(_=g.current)===null||_===void 0?void 0:_.scrollLeft)!==null&&U!==void 0?U:0}});let w=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var _,j;let I=G=>{G!=null&&(e.setFocusedKey(G),l&&e.replaceSelection(G))},A=E.relatedTarget;var U,X;A&&E.currentTarget.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_FOLLOWING?I((U=e.lastSelectedKey)!==null&&U!==void 0?U:(_=n.getLastKey)===null||_===void 0?void 0:_.call(n)):I((X=e.firstSelectedKey)!==null&&X!==void 0?X:(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n))}else!p&&g.current&&(g.current.scrollTop=S.current.top,g.current.scrollLeft=S.current.left);if(e.focusedKey!=null&&g.current){let I=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);I&&(I.contains(document.activeElement)||xt(I),gs()==="keyboard"&&Qa(I,{containingElement:r.current}))}}},P=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);fr(r,Zh,c?E=>{let{detail:_}=E;E.stopPropagation(),e.setFocused(!0),(_==null?void 0:_.focusStrategy)==="first"&&(x.current=!0)}:void 0);let O=De(()=>{var E,_;let j=(_=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&_!==void 0?_:null;if(j==null){var U;(U=r.current)===null||U===void 0||U.dispatchEvent(new CustomEvent(Ou,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(j),x.current=!1});Ya(()=>{x.current&&O()},[e.collection,O]);let D=De(()=>{e.collection.size>0&&(x.current=!1)});Ya(()=>{D()},[e.focusedKey,D]),fr(r,Qh,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,_;let X=null;var j;i==="first"&&(X=(j=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&j!==void 0?j:null);var U;i==="last"&&(X=(U=(_=n.getLastKey)===null||_===void 0?void 0:_.call(n))!==null&&U!==void 0?U:null);let I=e.selectedKeys;if(I.size){for(let A of I)if(e.canSelectItem(A)){X=A;break}}e.setFocused(!0),e.setFocusedKey(X),X==null&&!c&&r.current&&qr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&g.current&&r.current){let E=gs(),_=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!_)return;(E==="keyboard"||b.current)&&(Pu(g.current,_),E!=="virtual"&&Qa(_,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&qr(r.current),k.current=e.focusedKey,b.current=!1}),fr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let B={onKeyDown:y,onFocus:w,onBlur:P,onMouseDown(E){g.current===E.target&&E.preventDefault()}},{typeSelectProps:N}=av({keyboardDelegate:n,selectionManager:e});u||(B=ye(N,B));let z;return c?z=-1:z=e.focusedKey==null?0:-1,{collectionProps:{...B,tabIndex:z}}}function Bc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:h="action"}=t,p=fi();e=tr(e);let g=I=>{if(I.pointerType==="keyboard"&&Ko(I))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(h==="selection"&&i.current){let A=n.getItemProps(r);p.open(i.current,I,A.href,A.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(h==="override"||h==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):I&&I.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||I&&(rn(I)||I.pointerType==="touch"||I.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)s?s():document.activeElement!==i.current&&i.current&&qr(i.current);else{var A;let G=new CustomEvent(Ou,{cancelable:!0,bubbles:!0});(A=i.current)===null||A===void 0||A.dispatchEvent(G)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let m={};!a&&!l?m={tabIndex:r===n.focusedKey?0:-1,onFocus(I){I.target===i.current&&n.setFocusedKey(r)}}:l&&(m.onMouseDown=I=>{I.preventDefault()});let f=n.isLink(r)&&h==="override",v=n.isLink(r)&&h!=="selection"&&h!=="none",y=!l&&n.canSelectItem(r)&&!f,S=(u||v)&&!l,w=S&&(n.selectionBehavior==="replace"?!y:!y||n.isEmpty),P=S&&y&&n.selectionBehavior==="replace",x=w||P,O=d.useRef(null),D=x&&y,b=d.useRef(!1),k=d.useRef(!1),B=I=>{if(u&&u(),v&&i.current){let A=n.getItemProps(r);p.open(i.current,I,A.href,A.routerOptions)}},N={};o?(N.onPressStart=I=>{O.current=I.pointerType,b.current=D,I.pointerType==="keyboard"&&(!x||ks())&&g(I)},c?(N.onPressUp=w?void 0:I=>{I.pointerType==="mouse"&&y&&g(I)},N.onPress=w?B:I=>{I.pointerType!=="keyboard"&&I.pointerType!=="mouse"&&y&&g(I)}):N.onPress=I=>{if(w||P&&I.pointerType!=="mouse"){if(I.pointerType==="keyboard"&&!_s())return;B(I)}else I.pointerType!=="keyboard"&&y&&g(I)}):(N.onPressStart=I=>{O.current=I.pointerType,b.current=D,k.current=w,y&&(I.pointerType==="mouse"&&!w||I.pointerType==="keyboard"&&(!S||ks()))&&g(I)},N.onPress=I=>{(I.pointerType==="touch"||I.pointerType==="pen"||I.pointerType==="virtual"||I.pointerType==="keyboard"&&x&&_s()||I.pointerType==="mouse"&&k.current)&&(x?B(I):y&&g(I))}),m["data-key"]=r,N.preventFocusOnPress=a;let{pressProps:z,isPressed:E}=ya(N),_=P?I=>{O.current==="mouse"&&(I.stopPropagation(),I.preventDefault(),B(I))}:void 0,{longPressProps:j}=gg({isDisabled:!D,onLongPress(I){I.pointerType==="touch"&&(g(I),n.setSelectionBehavior("toggle"))}}),U=I=>{O.current==="touch"&&b.current&&I.preventDefault()},X=n.isLink(r)?I=>{_t.isOpening||I.preventDefault()}:void 0;return{itemProps:ye(m,y||w?z:{},D?j:{},{onDoubleClick:_,onDragStartCapture:U,onClick:X,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:y,hasAction:x}}function _s(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function ks(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Rs{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class lv{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Rs(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Rs(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function uv(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,s=_g({usage:"search",sensitivity:"base"}),l=e.disabledBehavior,u=d.useMemo(()=>o||new lv({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:c}=Hc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Wc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function cv(t){return dv(t)}function dv(t,e){for(let n of t)return n}function Bi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ns(t,e),e],i=[...Ns(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ns(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ms=new WeakMap;function fv(t){let e=Ms.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Wc(o,t)):n++};return r(t),Ms.set(t,n),n}const Uc=new WeakMap;function hv(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Be(t,{labelable:!0}),{listProps:l}=uv({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Uc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=l.onKeyDown)===null||c===void 0||c.call(l,u))}})}}function pv(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:c,onPressChange:h,onPressEnd:p,onHoverStart:g,onHoverChange:m,onHoverEnd:f,onKeyDown:v,onKeyUp:y,onFocus:S,onFocusChange:w,onBlur:P,selectionManager:x=e.selectionManager}=t,O=!!s,D=O&&t["aria-expanded"]==="true";var b;let k=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var B;let N=(B=t.isSelected)!==null&&B!==void 0?B:x.isSelected(i),z=Uc.get(e),E=e.collection.getItem(i),_=t.onClose||z.onClose,j=fi(),U=re=>{var Ue;if(!O){if(!(E==null||(Ue=E.props)===null||Ue===void 0)&&Ue.onAction?E.props.onAction():t.onAction&&t.onAction(i),z.onAction){let st=z.onAction;st(i)}re.target instanceof HTMLAnchorElement&&E&&j.open(re.target,re,E.props.href,E.props.routerOptions)}},X="menuitem";O||(x.selectionMode==="single"?X="menuitemradio":x.selectionMode==="multiple"&&(X="menuitemcheckbox"));let I=_i(),A=_i(),G=_i(),Y={id:r,"aria-disabled":k||void 0,role:X,"aria-label":t["aria-label"],"aria-labelledby":I,"aria-describedby":[A,G].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":s,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!O&&(Y["aria-checked"]=N),a&&(Y["aria-posinset"]=E==null?void 0:E.index,Y["aria-setsize"]=fv(e.collection));let M=re=>{re.pointerType==="keyboard"&&U(re),l==null||l(re)},R=()=>{!O&&_&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&_()},K=re=>{re.pointerType==="mouse"&&(U(re),R()),u==null||u(re)},L=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(U(re),R()),c==null||c(re)},{itemProps:H,isFocused:W}=Bc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:z.shouldUseVirtualFocus}),{pressProps:F,isPressed:J}=ya({onPressStart:M,onPress:L,onPressUp:K,onPressChange:h,onPressEnd:p,isDisabled:k}),{hoverProps:te}=wa({isDisabled:k,onHoverStart(re){!cg()&&!(D&&s==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),g==null||g(re)},onHoverChange:m,onHoverEnd:f}),{keyboardProps:de}=hg({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!k&&x.selectionMode==="none"&&!O&&o!==!1&&_&&_();break;case"Enter":!k&&o!==!1&&!O&&_&&_();break;default:O||re.continuePropagation(),v==null||v(re);break}},onKeyUp:y}),{focusProps:ce}=ag({onBlur:P,onFocus:S,onFocusChange:w}),oe=Be(E==null?void 0:E.props);delete oe.id;let ge=Cu(E==null?void 0:E.props);return{menuItemProps:{...Y,...ye(oe,ge,O?{onFocus:H.onFocus,"data-key":H["data-key"]}:H,F,te,de,ce),tabIndex:H.tabIndex!=null&&D?-1:H.tabIndex},labelProps:{id:I},descriptionProps:{id:A},keyboardShortcutProps:{id:G},isFocused:W,isSelected:N,isPressed:J,isDisabled:k}}function gv(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function vv(t){let e=Be(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Vc=new WeakMap;function Zr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Vc.get(t)}-${n}-${e}`):""}function mv(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:s}=e,l=r===s,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:h}=Bc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),p=Zr(e,r,"tab"),g=Zr(e,r,"tabpanel"),{tabIndex:m}=c,f=e.collection.getItem(r),v=Be(f==null?void 0:f.props,{labelable:!0});delete v.id;let y=Cu(f==null?void 0:f.props);return{tabProps:ye(v,y,c,{id:p,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?g:void 0,tabIndex:u?void 0:m,role:"tab"}),isSelected:l,isDisabled:u,isPressed:h}}function yv(t,e,n){let r=Qp(n)?void 0:0;var i;const o=Zr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=sa({...t,id:o,"aria-labelledby":Zr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class bv{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function Sv(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:s}=e,{direction:l}=or(),u=d.useMemo(()=>new bv(o,l,r,s),[o,s,r,l]),{collectionProps:c}=Hc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),h=tr();Vc.set(e,h);let p=sa({...t,id:h});return{tabListProps:{...ye(c,p),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const wv=d.createContext({});function Ev(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class $v{build(e,n){return this.context=n,As(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,S=>{v.push(S)});var o;let y=(o=e.index)!==null&&o!==void 0?o:0;for(const S of v)yield*this.getFullNode({element:S,index:y++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let P=a.type;throw new Error(`Unknown element <${P}> in collection.`)}let y=v.getCollectionNode(a.props,this.context);var s;let S=(s=e.index)!==null&&s!==void 0?s:0,w=y.next();for(;!w.done&&w.value;){let P=w.value;e.index=S;var l;let x=(l=P.key)!==null&&l!==void 0?l:null;x==null&&(x=P.element?null:this.getKey(a,e,n,r));let D=[...this.getFullNode({...P,key:x,index:S,wrapper:xv(e.wrapper,P.wrapper)},this.getChildState(n,P),r?`${r}${a.key}`:a.key,i)];for(let b of D){var u,c;b.value=(c=(u=P.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var h;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Wi(b.type)}> in <${Wi((h=i==null?void 0:i.type)!==null&&h!==void 0?h:"unknown parent type")}>. Only <${Wi(e.type)}> is supported.`);S++,yield b}w=y.next(D)}return}if(e.key==null||e.type==null)return;let p=this;var g,m;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(g=e.value)!==null&&g!==void 0?g:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(m=e.textValue)!==null&&m!==void 0?m:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:As(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let y of e.childNodes()){y.key!=null&&(y.key=`${f.key}${y.key}`);let S=p.getFullNode({...y,index:v},p.getChildState(n,y),f.key,f);for(let w of S)v++,yield w}})};yield f}constructor(){this.cache=new WeakMap}}function As(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function xv(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Wi(t){return t[0].toUpperCase()+t.slice(1)}function Gc(t,e,n){let r=d.useMemo(()=>new $v,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return e(l)},[r,i,o,a,n,e])}function Cv(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Tv(t){return Dv(t)}function Dv(t,e){for(let n of t)return n}function Ui(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Ls(t,e),e],i=[...Ls(t,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Ls(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Pv(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>h(e,new Map)),{items:s,nodeMap:l}=o,[u,c]=d.useState(new Set(n||[]));function h(f=[],v,y){return f==null&&(f=[]),{items:f.map(S=>{let w={key:r(S),parentKey:y,value:S,children:null};return w.children=h(i(S),v,w.key).items,v.set(w.key,w),w}),nodeMap:v}}function p(f,v,y,S){let w=S.get(v);if(!w)return{items:f,nodeMap:S};let P=new Map(S),x=y(w);for(x==null?m(w,P):g(x,P);w&&w.parentKey;){let D=P.get(w.parentKey),b={key:D.key,parentKey:D.parentKey,value:D.value,children:null},k=D.children;x==null&&k&&(k=k.filter(B=>B!==w));var O;b.children=(O=k==null?void 0:k.map(B=>B===w?x:B))!==null&&O!==void 0?O:null,P.set(b.key,b),x=b,w=D}return x==null&&(f=f.filter(D=>D!==w)),{items:f.map(D=>D===w?x:D),nodeMap:P}}function g(f,v){if(v.set(f.key,f),f.children)for(let y of f.children)g(y,v)}function m(f,v){if(v.delete(f.key),f.children)for(let y of f.children)m(y,v)}return{items:s,selectedKeys:u,setSelectedKeys:c,getItem(f){return l.get(f)},insert(f,v,...y){a(({items:S,nodeMap:w})=>{let{items:P,nodeMap:x}=h(y,w,f);return f==null?{items:[...S.slice(0,v),...P,...S.slice(v)],nodeMap:x}:p(S,f,O=>({key:O.key,parentKey:O.parentKey,value:O.value,children:[...O.children.slice(0,v),...P,...O.children.slice(v)]}),x)})},insertBefore(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),P=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,P,...v)},insertAfter(f,...v){let y=l.get(f);if(!y)return;let S=l.get(y.parentKey),P=(S?S.children:s).indexOf(y);var x;this.insert((x=S==null?void 0:S.key)!==null&&x!==void 0?x:null,P+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,s.length,...v);else{let y=l.get(f);if(!y)return;this.insert(f,y.children.length,...v)}},remove(...f){if(f.length===0)return;let v=s,y=l,S;for(let P of f)S=p(v,P,()=>null,y),y=S.nodeMap,v=S.items;a(S);let w=new Set(u);for(let P of u)S.nodeMap.has(P)||w.delete(P);c(w)},removeSelectedItems(){this.remove(...u)},move(f,v,y){a(({items:S,nodeMap:w})=>{let P=w.get(f);if(!P)return{items:S,nodeMap:w};let{items:x,nodeMap:O}=p(S,f,()=>null,w);const D={...P,parentKey:v};return v==null?(O.set(D.key,D),{items:[...x.slice(0,y),D,...x.slice(y)],nodeMap:O}):p(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,y),D,...b.children.slice(y)]}),O)})},update(f,v){a(({items:y,nodeMap:S})=>p(y,f,w=>{let P={key:w.key,parentKey:w.parentKey,value:v,children:null},x=h(i(v),S,P.key);return P.children=x.items,P},S))}}}class Ks{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)n(s)};for(let a of e)n(a);let r=null,i=0;for(let[a,s]of this.keyMap)r?(r.nextKey=a,s.prevKey=r.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=i++),r=s,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class qc extends Set{constructor(e,n,r){super(e),e instanceof qc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Ov(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Yc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>Fs(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Fs(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(y(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,P="first"){l.current=w,u.current=P,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!Ov(w,g))&&m(w)},disabledKeys:f,disabledBehavior:o}}function Fs(t,e){return t?t==="all"?"all":new tt(t):e}let Xc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Ui(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Ui(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=Tv(Cv(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Iv(t){let{filter:e,layoutDelegate:n}=t,r=Yc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new Ks(e(c)):new Ks(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Gc(t,o,a),l=d.useMemo(()=>new Xc(s,r,{layoutDelegate:n}),[s,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)&&u.current){const y=u.current.getItem(r.focusedKey),S=[...u.current.getKeys()].map(b=>{const k=u.current.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null),w=[...s.getKeys()].map(b=>{const k=s.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null);var c,h;const P=((c=S==null?void 0:S.length)!==null&&c!==void 0?c:0)-((h=w==null?void 0:w.length)!==null&&h!==void 0?h:0);var p,g,m;let x=Math.min(P>1?Math.max(((p=y==null?void 0:y.index)!==null&&p!==void 0?p:0)-P+1,0):(g=y==null?void 0:y.index)!==null&&g!==void 0?g:0,((m=w==null?void 0:w.length)!==null&&m!==void 0?m:0)-1),O=null,D=!1;for(;x>=0;){if(!l.isDisabled(w[x].key)){O=w[x];break}if(x<w.length-1&&!D)x++;else{D=!0;var f,v;x>((f=y==null?void 0:y.index)!==null&&f!==void 0?f:0)&&(x=(v=y==null?void 0:y.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(O?O.key:null)}u.current=s},[s,l,r,r.focusedKey]),{collection:s,disabledKeys:i,selectionManager:l}}function _v(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:s}=Iv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let h=(c=u.values().next().value)!==null&&c!==void 0?c:null;h===n&&t.onSelectionChange&&t.onSelectionChange(h),r(h)}}),l=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:s,selectedKey:n,setSelectedKey:r,selectedItem:l}}function kv(t){var e,n;let r=_v({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:js(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,s=d.useRef(a);return d.useEffect(()=>{let l=a;(i.isEmpty||l==null||!o.getItem(l))&&(l=js(o,r.disabledKeys),l!=null&&i.setSelectedKeys([l])),(l!=null&&i.focusedKey==null||!i.isFocused&&l!==s.current)&&i.setFocusedKey(l),s.current=l}),{...r,isDisabled:t.isDisabled||!1}}function js(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Rv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of e)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function Nv(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Yc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Gc(t,d.useCallback(l=>new Rv(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(Mv(n,l))},setExpandedKeys:r,selectionManager:new Xc(a,i)}}function Mv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Av=d.createContext(null),Lv=d.createContext(null),Jc={CollectionRoot({collection:t,renderDropIndicator:e}){return zs(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return zs(t,e,n)}};function zs(t,e,n){return ku({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=t.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const gi=d.createContext(Jc);function Qc(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Kv=d.createContext({}),Zc=d.createContext({}),Fv=fa("separator",function(e,n){[e,n]=ir(e,n,Zc);let{elementType:r,orientation:i,style:o,className:a}=e,s=r||"hr";s==="hr"&&i==="vertical"&&(s="div");let{separatorProps:l}=vv({elementType:r,orientation:i});return d.createElement(s,{...Be(e),...l,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),jv=d.createContext({placement:"bottom"}),zv=d.createContext(null),Hv=d.forwardRef(function(e,n){[e,n]=ir(e,n,zv);let r=d.useContext(nm),i=Ev(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=tp(n,o.isOpen)||e.isExiting||!1;if(sp()){let l=e.children;return typeof l=="function"&&(l=l({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,l)}return o&&!o.isOpen&&!a?null:d.createElement(Bv,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function Bv({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:c,placement:h}=ev({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},t),p=r.popoverRef,g=ep(p,!!h)||r.isEntering||!1,m=yt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:g,isExiting:e}}),f={...l.style,...m.style};return d.createElement(iv,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Be(r),l),...m,ref:p,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":h,"data-entering":g||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(Is,{onDismiss:t.close}),d.createElement(jv.Provider,{value:{...c,placement:h,ref:i}},m.children),d.createElement(Is,{onDismiss:t.close})))}const Wv=d.createContext({});class ze extends Set{constructor(e,n,r){super(e),e instanceof ze?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Uv(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Vv(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>Hs(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Hs(t.defaultSelectedKeys,new ze),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let S=d.useRef(i);return d.useEffect(()=>{i!==S.current&&(y(i),S.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(w){a.current=w,s(w)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(w,P="first"){l.current=w,u.current=P,c(w)},selectedKeys:g,setSelectedKeys(w){(r||!Uv(w,g))&&m(w)},disabledKeys:f,disabledBehavior:o}}function Hs(t,e){return t?t==="all"?"all":new ze(t):e}class Gv{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Bi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ze([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ze(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Bi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new ze(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new ze([n],n,n):new ze;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new ze;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=cv(Wc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ze)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const qv=d.createContext(null),Ea=d.createContext(null),Yv=d.createContext(null),ei=d.createContext(null),Xv=d.createContext(null),Jv=d.forwardRef(function(e,n){return[e,n]=ir(e,n,qv),d.createElement(Nu,{content:d.createElement(Mu,e)},r=>r.size>0&&d.createElement(Qv,{props:e,collection:r,menuRef:n}))});function Qv({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Av)||{};n=xn(d.useMemo(()=>wu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),s=Nv({...t,collection:a,children:void 0}),l=d.useContext(Yv),{isVirtualized:u,CollectionRoot:c}=d.useContext(gi),{menuProps:h}=hv({...t,...i,isVirtualized:u,onClose:t.onClose||(l==null?void 0:l.close)},s,n),p=yt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Gu,null,d.createElement("div",{...Be(t),...h,...p,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[Ea,s],[Zc,{elementType:"div"}],[Lv,{name:"MenuSection",render:em}],[Xv,{parentMenuRef:n}],[Fo,null],[ei,s.selectionManager]]},d.createElement(c,{collection:s.collection,persistedKeys:Qc(s.selectionManager.focusedKey),scrollRef:n}))))}class Zv extends Gv{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function em(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Ea),{CollectionBranch:s}=d.useContext(gi),[l,u]=np();var c;let{headingProps:h,groupProps:p}=gv({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),g=yt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),m=d.useContext(ei),f=Vv(t),v=t.selectionMode!=null?new Zv(m,f):m;return d.createElement("section",{...Be(t),...p,...g,ref:e},d.createElement(rr,{values:[[Kv,{...h,ref:l}],[ei,v]]},d.createElement(s,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),tm=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=la(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(Ea),s=xn(n),l=d.useContext(ei),{menuItemProps:u,labelProps:c,descriptionProps:h,keyboardShortcutProps:p,...g}=pv({...e,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:m,focusProps:f}=hi(),{hoverProps:v,isHovered:y}=wa({isDisabled:g.isDisabled}),S=yt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...g,isHovered:y,isFocusVisible:m,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?"a":"div";return d.createElement(w,{...ye(u,f,v),...S,ref:s,"data-disabled":g.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":g.isFocused||void 0,"data-focus-visible":m||void 0,"data-pressed":g.isPressed||void 0,"data-selected":g.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[wv,{slots:{label:c,description:h}}],[Wv,p]]},S.children))}),nm=d.createContext(null),vi=d.createContext(null),bn=d.createContext(null),rm=d.forwardRef(function(e,n){[e,n]=ir(e,n,vi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(Nu,{content:r},o=>d.createElement(im,{props:e,collection:o,tabsRef:n}))});function im({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=kv({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:s}=hi({within:!0}),l=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:s}),[r,a,s]),u=yt({...t,defaultClassName:"react-aria-Tabs",values:l});return d.createElement("div",{...Be(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[vi,t],[bn,i]]},u.children))}const om=d.forwardRef(function(e,n){return d.useContext(bn)?d.createElement(am,{props:e,forwardedRef:n}):d.createElement(Mu,e)});function am({props:t,forwardedRef:e}){let n=d.useContext(bn),{CollectionRoot:r}=d.useContext(gi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=la(vi),a=xn(e),{tabListProps:s}=Sv({...t,orientation:i,keyboardActivation:o},n,a),l=yt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Be(t);return delete u.id,d.createElement("div",{...u,...s,ref:a,...l,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:Qc(n.selectionManager.focusedKey)}))}const sm=fa("item",(t,e,n)=>{let r=d.useContext(bn),i=xn(e),{tabProps:o,isSelected:a,isDisabled:s,isPressed:l}=mv({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:h}=hi(),{hoverProps:p,isHovered:g}=wa({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),m=yt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:s,isFocused:c,isFocusVisible:h,isPressed:l,isHovered:g}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,p,m),ref:i,"data-selected":a||void 0,"data-disabled":s||void 0,"data-focused":c||void 0,"data-focus-visible":h||void 0,"data-pressed":l||void 0,"data-hovered":g||void 0})}),lm=ap(function(e,n){const r=d.useContext(bn);let i=xn(n),{tabPanelProps:o}=yv(e,r,i),{focusProps:a,isFocused:s,isFocusVisible:l}=hi(),u=r.selectedKey===e.id,c=yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:s,isFocusVisible:l,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let h=Be(e);delete h.id;let p=u?ye(h,o,a,c):c;return d.createElement("div",{...p,ref:i,"data-focused":s||void 0,"data-focus-visible":l||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[vi,null],[bn,null]]},d.createElement(gi.Provider,{value:Jc},c.children)))}),ed=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),s=u=>{n==null||n(u)},l=d.useRef(null);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"c__dropdown-menu-trigger",ref:l,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),T.jsx(Hv,{triggerRef:l,style:{marginTop:"0px"},isOpen:e,onOpenChange:s,children:T.jsx(Jv,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>T.jsxs(d.Fragment,{children:[T.jsxs(tm,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),s(!1)},isDisabled:u.isDisabled,children:[u.icon,T.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&T.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&T.jsx(Fv,{})]},u.label))})})]})},td=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},nd=({languages:t})=>{const{isOpen:e,setIsOpen:n}=td();return T.jsx(ed,{options:t,isOpen:e,onOpenChange:n,children:T.jsxs(mn.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[T.jsx("span",{className:"material-icons",children:"translate"}),T.jsx("span",{className:"c__language-picker__label",children:"Français"}),T.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},rd=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=mn.useCunningham();return T.jsxs("div",{className:"c__header",children:[T.jsx("div",{className:"c__header__toggle-menu",children:T.jsx(mn.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:T.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),T.jsx("div",{className:"c__header__left",children:t}),T.jsxs("div",{className:"c__header__right",children:[n&&T.jsx("div",{className:"c__header__right__language-picker",children:T.jsx(nd,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-050":"#FFF4F4","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},logo:{src:"/assets/logo-gouv.svg",widthHeader:"110px",widthFooter:"220px",alt:"Gouvernement Logo"},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},tooltip:{padding:"4px 8px","background-color":"var(--c--theme--colors--greyscale-1000)"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},ar=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,s=t>r;return{isMobile:o,isTablet:a,isDesktop:s}},id=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=ar();return n?T.jsx("div",{className:"c__left-panel",children:t}):T.jsx("div",{className:ot("c__left-panel__mobile",{open:e}),children:t})},{createElement:Sn,createContext:um,createRef:Ox,forwardRef:od,useCallback:xe,useContext:ad,useEffect:Dt,useImperativeHandle:sd,useLayoutEffect:cm,useMemo:dm,useRef:Ce,useState:hn}=C,Bs=C[`useId${Math.random()}`.slice(0,5)],fm=cm,mi=um(null);mi.displayName="PanelGroupContext";const Pt=fm,hm=typeof Bs=="function"?Bs:()=>null;let pm=0;function $a(t=null){const e=hm(),n=Ce(t||e||null);return n.current===null&&(n.current=""+pm++),t??n.current}function ld({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:h,order:p,style:g,tagName:m="div",...f}){const v=ad(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:S,getPanelSize:w,getPanelStyle:P,groupId:x,isPanelCollapsed:O,reevaluatePanelConstraints:D,registerPanel:b,resizePanel:k,unregisterPanel:B}=v,N=$a(a),z=Ce({callbacks:{onCollapse:u,onExpand:c,onResize:h},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:N,idIsFromProps:a!==void 0,order:p});Ce({didLogMissingDefaultSizeWarning:!1}),Pt(()=>{const{callbacks:_,constraints:j}=z.current,U={...j};z.current.id=N,z.current.idIsFromProps=a!==void 0,z.current.order=p,_.onCollapse=u,_.onExpand=c,_.onResize=h,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=s,j.minSize=l,(U.collapsedSize!==j.collapsedSize||U.collapsible!==j.collapsible||U.maxSize!==j.maxSize||U.minSize!==j.minSize)&&D(z.current,U)}),Pt(()=>{const _=z.current;return b(_),()=>{B(_)}},[p,N,b,B]),sd(o,()=>({collapse:()=>{y(z.current)},expand:_=>{S(z.current,_)},getId(){return N},getSize(){return w(z.current)},isCollapsed(){return O(z.current)},isExpanded(){return!O(z.current)},resize:_=>{k(z.current,_)}}),[y,S,w,O,N,k]);const E=P(z.current,i);return Sn(m,{...f,children:t,className:e,id:a,style:{...E,...g},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":N,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const zo=od((t,e)=>Sn(ld,{...t,forwardedRef:e}));ld.displayName="Panel";zo.displayName="forwardRef(Panel)";let Ho=null,Tt=null;function gm(t,e){if(e){const n=(e&hd)!==0,r=(e&pd)!==0,i=(e&gd)!==0,o=(e&vd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function vm(){Tt!==null&&(document.head.removeChild(Tt),Ho=null,Tt=null)}function Vi(t,e){const n=gm(t,e);Ho!==n&&(Ho=n,Tt===null&&(Tt=document.createElement("style"),document.head.appendChild(Tt)),Tt.innerHTML=`*{cursor: ${n}!important;}`)}function ud(t){return t.type==="keydown"}function cd(t){return t.type.startsWith("pointer")}function dd(t){return t.type.startsWith("mouse")}function yi(t){if(cd(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(dd(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function mm(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ym(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function bm(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Vs(t),b:Vs(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ee(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Us(Ws(n.a)),b:Us(Ws(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const l=o[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(i.a-i.b)}const Sm=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wm(t){var e;const n=getComputedStyle((e=fd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Em(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||wm(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Sm.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ws(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),Em(n))return n}return null}function Us(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Vs(t){const e=[];for(;t;)e.push(t),t=fd(t);return e}function fd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const hd=1,pd=2,gd=4,vd=8,$m=mm()==="coarse";let He=[],pn=!1,pt=new Map,bi=new Map;const Xn=new Set;function xm(t,e,n,r,i){var o;const{ownerDocument:a}=e,s={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},l=(o=pt.get(a))!==null&&o!==void 0?o:0;return pt.set(a,l+1),Xn.add(s),ti(),function(){var c;bi.delete(t),Xn.delete(s);const h=(c=pt.get(a))!==null&&c!==void 0?c:1;if(pt.set(a,h-1),ti(),h===1&&pt.delete(a),He.includes(s)){const p=He.indexOf(s);p>=0&&He.splice(p,1),Ca(),i("up",!0,null)}}}function Gs(t){const{target:e}=t,{x:n,y:r}=yi(t);pn=!0,xa({target:e,x:n,y:r}),ti(),He.length>0&&(ni("down",t),t.preventDefault(),t.stopPropagation())}function Rn(t){const{x:e,y:n}=yi(t);if(pn&&t.buttons===0&&(pn=!1,ni("up",t)),!pn){const{target:r}=t;xa({target:r,x:e,y:n})}ni("move",t),Ca(),He.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),pn=!1,He.length>0&&t.preventDefault(),ni("up",t),xa({target:e,x:n,y:r}),Ca(),ti()}function xa({target:t,x:e,y:n}){He.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Xn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,s=o.getBoundingClientRect(),{bottom:l,left:u,right:c,top:h}=s,p=$m?a.coarse:a.fine;if(e>=u-p&&e<=c+p&&n>=h-p&&n<=l+p){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&bm(r,o)>0){let m=r,f=!1;for(;m&&!m.contains(o);){if(ym(m.getBoundingClientRect(),s)){f=!0;break}m=m.parentElement}if(f)return}He.push(i)}})}function Gi(t,e){bi.set(t,e)}function Ca(){let t=!1,e=!1;He.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Vi("intersection",n):t?Vi("horizontal",n):e?Vi("vertical",n):vm()}function ti(){pt.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",Gs),n.removeEventListener("pointerleave",Rn),n.removeEventListener("pointermove",Rn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Xn.size>0&&(pn?(He.length>0&&pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",Rn),n.addEventListener("pointermove",Rn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",Gs,{capture:!0}),n.addEventListener("pointermove",Rn))}))}function ni(t,e){Xn.forEach(n=>{const{setResizeHandlerState:r}=n,i=He.includes(n);r(t,i,e)})}function Cm(){const[t,e]=hn(0);return xe(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Nt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Nt(t,e,n)===0}function Te(t,e,n){return Nt(t,e,n)===0}function Tm(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function cn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ee(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=r;if(Nt(n,s)<0)if(o){const l=(i+s)/2;Nt(n,l)<0?n=i:n=s}else n=s;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Fn({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[s,l]=r;ee(s!=null,"Invalid first pivot index"),ee(l!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const h=t<0?l:s,p=n[h];ee(p,`Panel constraints not found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,g)){const y=f-v;Nt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}{const h=t<0?s:l,p=n[h];ee(p,`No panel constraints found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,f)){const y=v-g;Nt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}}{const h=t<0?1:-1;let p=t<0?l:s,g=0;for(;;){const f=e[p];ee(f!=null,`Previous layout not found for panel index ${p}`);const y=cn({panelConstraints:n,panelIndex:p,size:100})-f;if(g+=y,p+=h,p<0||p>=n.length)break}const m=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-m:m}{let p=t<0?s:l;for(;p>=0&&p<n.length;){const g=Math.abs(t)-Math.abs(u),m=e[p];ee(m!=null,`Previous layout not found for panel index ${p}`);const f=m-g,v=cn({panelConstraints:n,panelIndex:p,size:f});if(!Te(m,v)&&(u+=m-v,a[p]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?p--:p++}}if(Tm(i,a))return i;{const h=t<0?l:s,p=e[h];ee(p!=null,`Previous layout not found for panel index ${h}`);const g=p+u,m=cn({panelConstraints:n,panelIndex:h,size:g});if(a[h]=m,!Te(m,g)){let f=g-m,y=t<0?l:s;for(;y>=0&&y<n.length;){const S=a[y];ee(S!=null,`Previous layout not found for panel index ${y}`);const w=S+f,P=cn({panelConstraints:n,panelIndex:y,size:w});if(Te(S,P)||(f-=P-S,a[y]=P),Te(f,0))break;t>0?y--:y++}}}const c=a.reduce((h,p)=>p+h,0);return Te(c,100)?a:i}function Dm({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const s=n[0];ee(s!=null,"No pivot index found"),e.forEach((h,p)=>{const{constraints:g}=h,{maxSize:m=100,minSize:f=0}=g;p===s?(r=f,i=m):(o+=f,a+=m)});const l=Math.min(i,100-o),u=Math.max(r,100-a),c=t[s];return{valueMax:l,valueMin:u,valueNow:c}}function Jn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function md(t,e,n=document){const i=Jn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function yd(t,e,n){const r=md(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function bd(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Pm(t,e,n,r=document){var i,o,a,s;const l=Si(e,r),u=Jn(t,r),c=l?u.indexOf(l):-1,h=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,p=(a=(s=n[c+1])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null;return[h,p]}function Om({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){Ce({didWarnAboutMissingResizeHandle:!1}),Pt(()=>{if(!o)return;const s=Jn(n,o);for(let l=0;l<i.length-1;l++){const{valueMax:u,valueMin:c,valueNow:h}=Dm({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),p=s[l];if(p!=null){const g=i[l];ee(g,`No panel data found for index "${l}"`),p.setAttribute("aria-controls",g.id),p.setAttribute("aria-valuemax",""+Math.round(u)),p.setAttribute("aria-valuemin",""+Math.round(c)),p.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{s.forEach((l,u)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Dt(()=>{if(!o)return;const s=e.current;ee(s,"Eager values not found");const{panelDataArray:l}=s,u=bd(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Jn(n,o);ee(c,`No resize handles found for group id "${n}"`);const h=c.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");ee(g,"Resize handle element has no handle id attribute");const[m,f]=Pm(n,g,l,o);if(m==null||f==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const S=l.findIndex(w=>w.id===m);if(S>=0){const w=l[S];ee(w,`No panel data found for index ${S}`);const P=r[S],{collapsedSize:x=0,collapsible:O,minSize:D=0}=w.constraints;if(P!=null&&O){const b=Fn({delta:Te(P,x)?D-x:x-P,initialLayout:r,panelConstraints:l.map(k=>k.constraints),pivotIndices:yd(n,g,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return p.addEventListener("keydown",v),()=>{p.removeEventListener("keydown",v)}});return()=>{h.forEach(p=>p())}},[o,t,e,n,r,i,a])}function qs(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Sd(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Im(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);ee(a,`No resize handle element found for id "${e}"`);const s=a.getAttribute("data-panel-group-id");ee(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=r;const u=Sd(n,t),c=bd(s,i);ee(c,`No group element found for id "${s}"`);const h=c.getBoundingClientRect(),p=o?h.width:h.height;return(u-l)/p*100}function _m(t,e,n,r,i,o){if(ud(t)){const a=n==="horizontal";let s=0;t.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(t.key){case"ArrowDown":l=a?0:s;break;case"ArrowLeft":l=a?-s:0;break;case"ArrowRight":l=a?s:0;break;case"ArrowUp":l=a?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:Im(t,e,n,r,o)}function km({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;s!=null&&(r++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(s!=null)continue;const l=t.length-r,u=i/l;r++,e[o]=u,i-=u}return e}function Vt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:s,id:l}=o,{collapsedSize:u=0,collapsible:c}=s,h=n[l];if(h==null||r!==h){n[l]=r;const{onCollapse:p,onExpand:g,onResize:m}=a;m&&m(r,h),c&&(p||g)&&(g&&(h==null||nt(h,u))&&!nt(r,u)&&g(),p&&(h==null||!nt(h,u))&&nt(r,u)&&p())}})}function wr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Rm({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let s;return a==null?s=t!=null?t.toPrecision(o):"1":r.length===1?s="1":s=a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Nm(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Ys(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function wd(t){return`react-resizable-panels:${t}`}function Ed(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function $d(t,e){try{const n=wd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Mm(t,e,n){var r,i;const o=(r=$d(t,n))!==null&&r!==void 0?r:{},a=Ed(e);return(i=o[a])!==null&&i!==void 0?i:null}function Am(t,e,n,r,i){var o;const a=wd(t),s=Ed(e),l=(o=$d(t,i))!==null&&o!==void 0?o:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(l))}catch(u){console.error(u)}}function Xs({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=100/r*a;n[o]=s}let i=0;for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=cn({panelConstraints:e,panelIndex:o,size:a});a!=s&&(i+=a-s,n[o]=s)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const s=a+i,l=cn({panelConstraints:e,panelIndex:o,size:s});if(a!==l&&(i-=l-a,n[o]=l,Te(i,0)))break}return n}const Lm=100,jn={getItem:t=>(Ys(jn),jn.getItem(t)),setItem:(t,e)=>{Ys(jn),jn.setItem(t,e)}},Js={};function xd({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=jn,style:u,tagName:c="div",...h}){const p=$a(o),g=Ce(null),[m,f]=hn(null),[v,y]=hn([]),S=Cm(),w=Ce({}),P=Ce(new Map),x=Ce(0),O=Ce({autoSaveId:t,direction:r,dragState:m,id:p,keyboardResizeBy:s,onLayout:a,storage:l}),D=Ce({layout:v,panelDataArray:[],panelDataArrayChanged:!1});Ce({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),sd(i,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:R}=D.current;return R},setLayout:R=>{const{onLayout:K}=O.current,{layout:L,panelDataArray:H}=D.current,W=Xs({layout:R,panelConstraints:H.map(F=>F.constraints)});qs(L,W)||(y(W),D.current.layout=W,K&&K(W),Vt(H,W,w.current))}}),[]),Pt(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=m,O.current.id=p,O.current.onLayout=a,O.current.storage=l}),Om({committedValuesRef:O,eagerValuesRef:D,groupId:p,layout:v,panelDataArray:D.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),Dt(()=>{const{panelDataArray:R}=D.current;if(t){if(v.length===0||v.length!==R.length)return;let K=Js[t];K==null&&(K=Nm(Am,Lm),Js[t]=K);const L=[...R],H=new Map(P.current);K(t,L,H,v,l)}},[t,v,l]),Dt(()=>{});const b=xe(R=>{const{onLayout:K}=O.current,{layout:L,panelDataArray:H}=D.current;if(R.constraints.collapsible){const W=H.map(de=>de.constraints),{collapsedSize:F=0,panelSize:J,pivotIndices:te}=St(H,R,L);if(ee(J!=null,`Panel size not found for panel "${R.id}"`),!nt(J,F)){P.current.set(R.id,J);const ce=an(H,R)===H.length-1?J-F:F-J,oe=Fn({delta:ce,initialLayout:L,panelConstraints:W,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});wr(L,oe)||(y(oe),D.current.layout=oe,K&&K(oe),Vt(H,oe,w.current))}}},[]),k=xe((R,K)=>{const{onLayout:L}=O.current,{layout:H,panelDataArray:W}=D.current;if(R.constraints.collapsible){const F=W.map(ge=>ge.constraints),{collapsedSize:J=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=St(W,R,H),oe=K??de;if(nt(te,J)){const ge=P.current.get(R.id),re=ge!=null&&ge>=oe?ge:oe,st=an(W,R)===W.length-1?te-re:re-te,ve=Fn({delta:st,initialLayout:H,panelConstraints:F,pivotIndices:ce,prevLayout:H,trigger:"imperative-api"});wr(H,ve)||(y(ve),D.current.layout=ve,L&&L(ve),Vt(W,ve,w.current))}}},[]),B=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{panelSize:H}=St(L,R,K);return ee(H!=null,`Panel size not found for panel "${R.id}"`),H},[]),N=xe((R,K)=>{const{panelDataArray:L}=D.current,H=an(L,R);return Rm({defaultSize:K,dragState:m,layout:v,panelData:L,panelIndex:H})},[m,v]),z=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{collapsedSize:H=0,collapsible:W,panelSize:F}=St(L,R,K);return ee(F!=null,`Panel size not found for panel "${R.id}"`),W===!0&&nt(F,H)},[]),E=xe(R=>{const{layout:K,panelDataArray:L}=D.current,{collapsedSize:H=0,collapsible:W,panelSize:F}=St(L,R,K);return ee(F!=null,`Panel size not found for panel "${R.id}"`),!W||Nt(F,H)>0},[]),_=xe(R=>{const{panelDataArray:K}=D.current;K.push(R),K.sort((L,H)=>{const W=L.order,F=H.order;return W==null&&F==null?0:W==null?-1:F==null?1:W-F}),D.current.panelDataArrayChanged=!0,S()},[S]);Pt(()=>{if(D.current.panelDataArrayChanged){D.current.panelDataArrayChanged=!1;const{autoSaveId:R,onLayout:K,storage:L}=O.current,{layout:H,panelDataArray:W}=D.current;let F=null;if(R){const te=Mm(R,W,L);te&&(P.current=new Map(Object.entries(te.expandToSizes)),F=te.layout)}F==null&&(F=km({panelDataArray:W}));const J=Xs({layout:F,panelConstraints:W.map(te=>te.constraints)});qs(H,J)||(y(J),D.current.layout=J,K&&K(J),Vt(W,J,w.current))}}),Pt(()=>{const R=D.current;return()=>{R.layout=[]}},[]);const j=xe(R=>{let K=!1;const L=g.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(W){W.preventDefault();const F=g.current;if(!F)return()=>null;const{direction:J,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=O.current,{layout:ge,panelDataArray:re}=D.current,{initialLayout:Ue}=te??{},st=yd(de,R,F);let ve=_m(W,R,J,te,ce,F);const Dn=J==="horizontal";Dn&&K&&(ve=-ve);const lr=re.map(q=>q.constraints),$=Fn({delta:ve,initialLayout:Ue??ge,panelConstraints:lr,pivotIndices:st,prevLayout:ge,trigger:ud(W)?"keyboard":"mouse-or-touch"}),V=!wr(ge,$);(cd(W)||dd(W))&&x.current!=ve&&(x.current=ve,!V&&ve!==0?Dn?Gi(R,ve<0?hd:pd):Gi(R,ve<0?gd:vd):Gi(R,0)),V&&(y($),D.current.layout=$,oe&&oe($),Vt(re,$,w.current))}},[]),U=xe((R,K)=>{const{onLayout:L}=O.current,{layout:H,panelDataArray:W}=D.current,F=W.map(ge=>ge.constraints),{panelSize:J,pivotIndices:te}=St(W,R,H);ee(J!=null,`Panel size not found for panel "${R.id}"`);const ce=an(W,R)===W.length-1?J-K:K-J,oe=Fn({delta:ce,initialLayout:H,panelConstraints:F,pivotIndices:te,prevLayout:H,trigger:"imperative-api"});wr(H,oe)||(y(oe),D.current.layout=oe,L&&L(oe),Vt(W,oe,w.current))},[]),X=xe((R,K)=>{const{layout:L,panelDataArray:H}=D.current,{collapsedSize:W=0,collapsible:F}=K,{collapsedSize:J=0,collapsible:te,maxSize:de=100,minSize:ce=0}=R.constraints,{panelSize:oe}=St(H,R,L);oe!=null&&(F&&te&&nt(oe,W)?nt(W,J)||U(R,J):oe<ce?U(R,ce):oe>de&&U(R,de))},[U]),I=xe((R,K)=>{const{direction:L}=O.current,{layout:H}=D.current;if(!g.current)return;const W=Si(R,g.current);ee(W,`Drag handle element not found for id "${R}"`);const F=Sd(L,K);f({dragHandleId:R,dragHandleRect:W.getBoundingClientRect(),initialCursorPosition:F,initialLayout:H})},[]),A=xe(()=>{f(null)},[]),G=xe(R=>{const{panelDataArray:K}=D.current,L=an(K,R);L>=0&&(K.splice(L,1),delete w.current[R.id],D.current.panelDataArrayChanged=!0,S())},[S]),Y=dm(()=>({collapsePanel:b,direction:r,dragState:m,expandPanel:k,getPanelSize:B,getPanelStyle:N,groupId:p,isPanelCollapsed:z,isPanelExpanded:E,reevaluatePanelConstraints:X,registerPanel:_,registerResizeHandle:j,resizePanel:U,startDragging:I,stopDragging:A,unregisterPanel:G,panelGroupElement:g.current}),[b,m,r,k,B,N,p,z,E,X,_,j,U,I,A,G]),M={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sn(mi.Provider,{value:Y},Sn(c,{...h,children:e,className:n,id:o,ref:g,style:{...M,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":p}))}const Cd=od((t,e)=>Sn(xd,{...t,forwardedRef:e}));xd.displayName="PanelGroup";Cd.displayName="forwardRef(PanelGroup)";function an(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function St(t,e,n){const r=an(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function Km({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Dt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const s=i.getAttribute("data-panel-group-id");ee(s,`No group element found for id "${s}"`);const l=Jn(s,r),u=md(s,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:l.length-1:u+1<l.length?u+1:0;l[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function Td({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c="div",...h}){var p,g;const m=Ce(null),f=Ce({onDragging:a});Dt(()=>{f.current.onDragging=a});const v=ad(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:y,groupId:S,registerResizeHandle:w,startDragging:P,stopDragging:x,panelGroupElement:O}=v,D=$a(i),[b,k]=hn("inactive"),[B,N]=hn(!1),[z,E]=hn(null),_=Ce({state:b});Pt(()=>{_.current.state=b}),Dt(()=>{if(n)E(null);else{const I=w(D);E(()=>I)}},[n,D,w]);const j=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,U=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return Dt(()=>{if(n||z==null)return;const I=m.current;return ee(I,"Element ref not attached"),xm(D,I,y,{coarse:j,fine:U},(G,Y,M)=>{if(Y)switch(G){case"down":{k("drag"),ee(M,'Expected event to be defined for "down" action'),P(D,M);const{onDragging:R}=f.current;R&&R(!0);break}case"move":{const{state:R}=_.current;R!=="drag"&&k("hover"),ee(M,'Expected event to be defined for "move" action'),z(M);break}case"up":{k("hover"),x();const{onDragging:R}=f.current;R&&R(!1);break}}else k("inactive")})},[j,y,n,U,w,D,z,P,x]),Km({disabled:n,handleId:D,resizeHandler:z,panelGroupElement:O}),Sn(c,{...h,children:t,className:e,id:i,onBlur:()=>{N(!1),o==null||o()},onFocus:()=>{N(!0),s==null||s()},ref:m,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...l},tabIndex:u,"data-panel-group-direction":y,"data-panel-group-id":S,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":B?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":D})}Td.displayName="PanelResizeHandle";const Fm=({children:t,isOpen:e})=>{const{isDesktop:n}=ar();return n?T.jsx("div",{className:ot("c__right-panel",{open:e}),children:t}):T.jsx("div",{className:ot("c__right-panel__mobile",{open:e}),children:t})},jm=({icon:t,children:e,leftPanelContent:n,rightPanelContent:r,rightHeaderContent:i,languages:o,enableResize:a=!1,rightPanelIsOpen:s=!1})=>{const[l,u]=d.useState(!1),{isDesktop:c}=ar(),h=d.useRef(null),[p,g]=d.useState(Er(300,c)),[m,f]=d.useState(Er(450,c)),v=()=>{u(!l)};return d.useEffect(()=>{const y=()=>{const S=Math.round(Er(300,c)),w=Math.round(Math.min(Er(450,c),40));g(c?S:0),f(a?w:S)};return y(),window.addEventListener("resize",()=>{y()}),()=>{window.removeEventListener("resize",y)}},[c,a]),T.jsxs("div",{className:"c__main-layout",children:[T.jsx("div",{className:"c__main-layout__header",children:T.jsx(rd,{onTogglePanel:v,isPanelOpen:l,rightIcon:i,leftIcon:t,languages:o})}),T.jsx("div",{className:"c__main-layout__content",children:T.jsxs(Cd,{autoSaveId:"persistance",direction:"horizontal",children:[T.jsx(zo,{ref:h,order:0,defaultSize:p,minSize:p,maxSize:m,children:T.jsx(id,{isOpen:c?!0:l,children:n})}),c&&T.jsx(Td,{className:"bg-greyscale-200",style:{width:"1px"}}),T.jsx(zo,{order:1,children:T.jsxs("div",{className:"c__main-layout__content__center",children:[T.jsx("div",{className:"c__main-layout__content__center__children",children:e}),T.jsx(Fm,{isOpen:s,children:r})]})})]})})]})},Er=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},zm=52,Da=({size:t="sm"})=>T.jsx("div",{className:["c__spinner",t].join(" ")}),Dd=({children:t,text:e,...n})=>T.jsxs("div",{className:"suite__label__container",children:[T.jsx("label",{...n,children:t}),e&&T.jsx("span",{className:"suite__label__container__description",children:e})]}),Hm=({label:t,text:e,labelSide:n="right",children:r})=>T.jsxs("div",{className:ot("c__with-label",{[n]:!0}),children:[T.jsx(Dd,{children:t,text:e}),r]});var Qs=1,Bm=.9,Wm=.8,Um=.17,qi=.1,Yi=.999,Vm=.9999,Gm=.99,qm=/[\\\/_+.#"@\[\(\{&]/,Ym=/[\\\/_+.#"@\[\(\{&]/g,Xm=/[\s-]/,Pd=/[\s-]/g;function Bo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Qs:Gm;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(o),u=n.indexOf(l,i),c=0,h,p,g,m;u>=0;)h=Bo(t,e,n,r,u+1,o+1,a),h>c&&(u===i?h*=Qs:qm.test(t.charAt(u-1))?(h*=Wm,g=t.slice(i,u-1).match(Ym),g&&i>0&&(h*=Math.pow(Yi,g.length))):Xm.test(t.charAt(u-1))?(h*=Bm,m=t.slice(i,u-1).match(Pd),m&&i>0&&(h*=Math.pow(Yi,m.length))):(h*=Um,i>0&&(h*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(h*=Vm)),(h<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(p=Bo(t,e,n,r,u+1,o+2,a),p*qi>h&&(h=p*qi)),h>c&&(c=h),u=n.indexOf(l,u+1);return a[s]=c,c}function Zs(t){return t.toLowerCase().replace(Pd," ")}function Jm(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Bo(t,e,Zs(t),Zs(e),0,0,{})}function mt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function el(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Od(...t){return e=>{let n=!1;const r=t.map(i=>{const o=el(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():el(t[i],null)}}}}function zt(...t){return C.useCallback(Od(...t),t)}function Qm(t,e){const n=C.createContext(e),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function Zm(t,e=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=h=>{var y;const{scope:p,children:g,...m}=h,f=((y=p==null?void 0:p[t])==null?void 0:y[l])||s,v=C.useMemo(()=>m,Object.values(m));return T.jsx(f.Provider,{value:v,children:g})};u.displayName=o+"Provider";function c(h,p){var f;const g=((f=p==null?void 0:p[t])==null?void 0:f[l])||s,m=C.useContext(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[t])||o;return C.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return i.scopeName=t,[r,ey(i,...e)]}function ey(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...s,...h}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ri=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},ty=C.useId||(()=>{}),ny=0;function it(t){const[e,n]=C.useState(ty());return ri(()=>{n(r=>r??String(ny++))},[t]),e?`radix-${e}`:""}function Mt(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function ry({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=iy({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,s=Mt(n),l=C.useCallback(u=>{if(o){const h=typeof u=="function"?u(t):u;h!==t&&s(h)}else i(u)},[o,t,i,s]);return[a,l]}function iy({defaultProp:t,onChange:e}){const n=C.useState(t),[r]=n,i=C.useRef(r),o=Mt(e);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Pa=C.forwardRef((t,e)=>{const{children:n,...r}=t,i=C.Children.toArray(n),o=i.find(ay);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return T.jsx(Wo,{...r,ref:e,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return T.jsx(Wo,{...r,ref:e,children:n})});Pa.displayName="Slot";var Wo=C.forwardRef((t,e)=>{const{children:n,...r}=t;if(C.isValidElement(n)){const i=ly(n),o=sy(r,n.props);return n.type!==C.Fragment&&(o.ref=e?Od(e,i):i),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});Wo.displayName="SlotClone";var oy=({children:t})=>T.jsx(T.Fragment,{children:t});function ay(t){return C.isValidElement(t)&&t.type===oy}function sy(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function ly(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var uy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=uy.reduce((t,e)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Pa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function cy(t,e){t&&ah.flushSync(()=>t.dispatchEvent(e))}function dy(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var fy="DismissableLayer",Uo="dismissableLayer.update",hy="dismissableLayer.pointerDownOutside",py="dismissableLayer.focusOutside",tl,Id=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_d=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=t,u=C.useContext(Id),[c,h]=C.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=C.useState({}),m=zt(e,D=>h(D)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=f.indexOf(v),S=c?f.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,P=S>=y,x=my(D=>{const b=D.target,k=[...u.branches].some(B=>B.contains(b));!P||k||(i==null||i(D),a==null||a(D),D.defaultPrevented||s==null||s())},p),O=yy(D=>{const b=D.target;[...u.branches].some(B=>B.contains(b))||(o==null||o(D),a==null||a(D),D.defaultPrevented||s==null||s())},p);return dy(D=>{S===u.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&s&&(D.preventDefault(),s()))},p),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),nl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tl)}},[c,p,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),nl())},[c,u]),C.useEffect(()=>{const D=()=>g({});return document.addEventListener(Uo,D),()=>document.removeEventListener(Uo,D)},[]),T.jsx(be.div,{...l,ref:m,style:{pointerEvents:w?P?"auto":"none":void 0,...t.style},onFocusCapture:mt(t.onFocusCapture,O.onFocusCapture),onBlurCapture:mt(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:mt(t.onPointerDownCapture,x.onPointerDownCapture)})});_d.displayName=fy;var gy="DismissableLayerBranch",vy=C.forwardRef((t,e)=>{const n=C.useContext(Id),r=C.useRef(null),i=zt(e,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(be.div,{...t,ref:i})});vy.displayName=gy;function my(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){kd(hy,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function yy(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&kd(py,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nl(){const t=new CustomEvent(Uo);document.dispatchEvent(t)}function kd(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?cy(i,o):i.dispatchEvent(o)}var Xi="focusScope.autoFocusOnMount",Ji="focusScope.autoFocusOnUnmount",rl={bubbles:!1,cancelable:!0},by="FocusScope",Rd=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[s,l]=C.useState(null),u=Mt(i),c=Mt(o),h=C.useRef(null),p=zt(e,f=>l(f)),g=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let f=function(w){if(g.paused||!s)return;const P=w.target;s.contains(P)?h.current=P:ct(h.current,{select:!0})},v=function(w){if(g.paused||!s)return;const P=w.relatedTarget;P!==null&&(s.contains(P)||ct(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&ct(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const S=new MutationObserver(y);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),S.disconnect()}}},[r,s,g.paused]),C.useEffect(()=>{if(s){ol.add(g);const f=document.activeElement;if(!s.contains(f)){const y=new CustomEvent(Xi,rl);s.addEventListener(Xi,u),s.dispatchEvent(y),y.defaultPrevented||(Sy(Cy(Nd(s)),{select:!0}),document.activeElement===f&&ct(s))}return()=>{s.removeEventListener(Xi,u),setTimeout(()=>{const y=new CustomEvent(Ji,rl);s.addEventListener(Ji,c),s.dispatchEvent(y),y.defaultPrevented||ct(f??document.body,{select:!0}),s.removeEventListener(Ji,c),ol.remove(g)},0)}}},[s,u,c,g]);const m=C.useCallback(f=>{if(!n&&!r||g.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(v&&y){const S=f.currentTarget,[w,P]=wy(S);w&&P?!f.shiftKey&&y===P?(f.preventDefault(),n&&ct(w,{select:!0})):f.shiftKey&&y===w&&(f.preventDefault(),n&&ct(P,{select:!0})):y===S&&f.preventDefault()}},[n,r,g.paused]);return T.jsx(be.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});Rd.displayName=by;function Sy(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ct(r,{select:e}),document.activeElement!==n)return}function wy(t){const e=Nd(t),n=il(e,t),r=il(e.reverse(),t);return[n,r]}function Nd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function il(t,e){for(const n of t)if(!Ey(n,{upTo:e}))return n}function Ey(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function $y(t){return t instanceof HTMLInputElement&&"select"in t}function ct(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&$y(t)&&e&&t.select()}}var ol=xy();function xy(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=al(t,e),t.unshift(e)},remove(e){var n;t=al(t,e),(n=t[0])==null||n.resume()}}}function al(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Cy(t){return t.filter(e=>e.tagName!=="A")}var Ty="Portal",Md=C.forwardRef((t,e)=>{var s;const{container:n,...r}=t,[i,o]=C.useState(!1);ri(()=>o(!0),[]);const a=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?jt.createPortal(T.jsx(be.div,{...r,ref:e}),a):null});Md.displayName=Ty;function Dy(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var wi=t=>{const{present:e,children:n}=t,r=Py(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=zt(r.ref,Oy(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};wi.displayName="Presence";function Py(t){const[e,n]=C.useState(),r=C.useRef({}),i=C.useRef(t),o=C.useRef("none"),a=t?"mounted":"unmounted",[s,l]=Dy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=$r(r.current);o.current=s==="mounted"?u:"none"},[s]),ri(()=>{const u=r.current,c=i.current;if(c!==t){const p=o.current,g=$r(u);t?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),ri(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,h=g=>{const f=$r(r.current).includes(g.animationName);if(g.target===e&&f&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},p=g=>{g.target===e&&(o.current=$r(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function $r(t){return(t==null?void 0:t.animationName)||"none"}function Oy(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Qi=0;function Iy(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??sl()),document.body.insertAdjacentElement("beforeend",t[1]??sl()),Qi++,()=>{Qi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qi--}},[])}function sl(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Rr="right-scroll-bar-position",Nr="width-before-scroll-bar",_y="with-scroll-bars-hidden",ky="--removed-body-scroll-bar-size";function Zi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Ry(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Ny=typeof window<"u"?C.useLayoutEffect:C.useEffect,ll=new WeakMap;function My(t,e){var n=Ry(null,function(r){return t.forEach(function(i){return Zi(i,r)})});return Ny(function(){var r=ll.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(s){o.has(s)||Zi(s,null)}),o.forEach(function(s){i.has(s)||Zi(s,a)})}ll.set(n,t)},[t]),n}function Ay(t){return t}function Ly(t,e){e===void 0&&(e=Ay);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function Ky(t){t===void 0&&(t={});var e=Ly(null);return e.options=Ge({async:!0,ssr:!1},t),e}var Ad=function(t){var e=t.sideCar,n=oc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Ge({},n))};Ad.isSideCarExport=!0;function Fy(t,e){return t.useMedium(e),Ad}var Ld=Ky(),eo=function(){},Ei=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,s=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,h=t.shards,p=t.sideCar,g=t.noIsolation,m=t.inert,f=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,S=t.gapMode,w=oc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,x=My([n,e]),O=Ge(Ge({},w),i);return C.createElement(C.Fragment,null,c&&C.createElement(P,{sideCar:Ld,removeScrollBar:u,shards:h,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:S}),a?C.cloneElement(C.Children.only(s),Ge(Ge({},O),{ref:x})):C.createElement(y,Ge({},O,{className:l,ref:x}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ei.classNames={fullWidth:Nr,zeroRight:Rr};var jy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zy(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=jy();return e&&t.setAttribute("nonce",e),t}function Hy(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function By(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Wy=function(){var t=0,e=null;return{add:function(n){t==0&&(e=zy())&&(Hy(e,n),By(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Uy=function(){var t=Wy();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Kd=function(){var t=Uy(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},Vy={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},Gy=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},qy=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Vy;var e=Gy(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Yy=Kd(),gn="data-scroll-locked",Xy=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,s=t.gap;return n===void 0&&(n="margin"),`
|
|
48
|
-
.`.concat(
|
|
47
|
+
*/var tl;function g2(){return tl||(tl=1,process.env.NODE_ENV!=="production"&&function(){function t(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}function e(g,m){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var f=m();if(!h){var v=m();o(f,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}v=a({inst:{value:f,getSnapshot:m}});var y=v[0].inst,C=v[1];return s(function(){y.value=f,y.getSnapshot=m,n(y)&&C({inst:y})},[g,f,m]),l(function(){return n(y)&&C({inst:y}),g(function(){n(y)&&C({inst:y})})},[g]),u(f),f}function n(g){var m=g.getSnapshot;g=g.value;try{var f=m();return!o(g,f)}catch{return!0}}function r(g,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,o=typeof Object.is=="function"?Object.is:t,a=i.useState,l=i.useEffect,s=i.useLayoutEffect,u=i.useDebugValue,c=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Ri.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ri}var nl;function v2(){return nl||(nl=1,process.env.NODE_ENV==="production"?hr.exports=p2():hr.exports=g2()),hr.exports}var da=v2();const Lu=d.createContext(!1),Yn=d.createContext(null);function Mu(t){if(d.useContext(Yn))return t.content;let{collection:n,document:r}=S2(t.createCollection);return d.createElement(d.Fragment,null,d.createElement(c2,null,d.createElement(Yn.Provider,{value:r},t.content)),d.createElement(m2,{render:t.children,collection:n}))}function m2({collection:t,render:e}){return e(t)}function y2(t,e,n){let r=En(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():e(),[e,n]);return da.useSyncExternalStore(t,o)}const b2=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:y2;function S2(t){let[e]=d.useState(()=>new s2((t==null?void 0:t())||new ca)),n=d.useCallback(a=>e.subscribe(a),[e]),r=d.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=d.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=b2(n,r,i);return h2(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const xo=d.createContext(null);function C2(t,e,n,r,i,o){let a=d.useCallback(s=>{s==null||s.setProps(e,n,r,o)},[e,n,r,o]),l=d.useContext(xo);if(l){let s=l.ownerDocument.nodesByProps.get(e);return s||(s=l.ownerDocument.createElement(t),s.setProps(e,n,r,o),l.appendChild(s),l.ownerDocument.updateCollection(),l.ownerDocument.nodesByProps.set(e,s)),i?d.createElement(xo.Provider,{value:s},i):null}return d.createElement(t,{ref:a},i)}function fa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{if(!d.useContext(Lu)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return C2(t,i,o,"children"in i?i.children:null,null,l=>d.createElement(n,{node:l}))});return r.displayName=e.name,r}function w2(t){return Ru({...t,addIdAndValue:!0})}const rl=d.createContext(null);function Au(t){let e=d.useContext(rl),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),i=w2({...t,idScope:r,dependencies:n});return d.useContext(Yn)&&(i=d.createElement(E2,null,i)),e=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(rl.Provider,{value:e},i)}function E2({children:t}){let e=d.useContext(Yn),n=d.useMemo(()=>d.createElement(Yn.Provider,{value:null},d.createElement(Lu.Provider,{value:!0},t)),[t]);return En()?d.createElement(xo.Provider,{value:e},n):Ht.createPortal(n,e)}const De=typeof document<"u"?d.useLayoutEffect:()=>{};function $2(t){const e=d.useRef(null);return De(()=>{e.current=t},[t]),d.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const me=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},gt=t=>t&&"window"in t&&t.window===t?t:me(t).defaultView||window;function il(t){if(x2())t.focus({preventScroll:!0});else{let e=T2(t);t.focus(),P2(e)}}let pr=null;function x2(){if(pr==null){pr=!1;try{document.createElement("div").focus({get preventScroll(){return pr=!0,!0}})}catch{}}return pr}function T2(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function P2(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Ku(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function D2(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ha(t){let e=null;return()=>(e==null&&(e=t()),e)}const O2=ha(function(){return D2(/^Mac/i)}),_2=ha(function(){return Ku(/Chrome/i)}),Fu=ha(function(){return Ku(/Android/i)});let an=new Map,To=new Set;function ol(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=an.get(r.target);i||(i=new Set,an.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=an.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),an.delete(r.target)),an.size===0)){for(let o of To)o();To.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?ol():document.addEventListener("DOMContentLoaded",ol));function I2(t){requestAnimationFrame(()=>{an.size===0?t():To.add(t)})}function k2(t){return t.mozInputSource===0&&t.isTrusted?!0:Fu()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function N2(t,e){return e.get?e.get.call(t):e.value}function ju(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function R2(t,e){var n=ju(t,e,"get");return N2(t,n)}function L2(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function M2(t,e,n){L2(t,e),e.set(t,n)}function A2(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function al(t,e,n){var r=ju(t,e,"set");return A2(t,r,n),n}let K2=class{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}};function Hu(t){let e=d.useRef({isFocused:!1,observer:null});De(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=$2(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new K2("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let l=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function F2(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),i&&i(!1),!0},[r,i]),a=Hu(o),l=d.useCallback(s=>{const u=me(s.target);s.target===s.currentTarget&&u.activeElement===s.target&&(n&&n(s),i&&i(!0),a(s))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?l:void 0,onBlur:!e&&(r||i)?o:void 0}}}let xn=null,Po=new Set,Vn=new Map,Nt=!1,Do=!1;const j2={Tab:!0,Escape:!0};function pa(t,e){for(let n of Po)n(t,e)}function H2(t){return!(t.metaKey||!O2()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Gr(t){Nt=!0,H2(t)&&(xn="keyboard",pa("keyboard",t))}function Ne(t){xn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Nt=!0,pa("pointer",t))}function zu(t){k2(t)&&(Nt=!0,xn="virtual")}function Vu(t){t.target===window||t.target===document||(!Nt&&!Do&&(xn="virtual",pa("virtual",t)),Nt=!1,Do=!1)}function Bu(){Nt=!1,Do=!0}function Oo(t){if(typeof window>"u"||Vn.get(gt(t)))return;const e=gt(t),n=me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Nt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Gr,!0),n.addEventListener("keyup",Gr,!0),n.addEventListener("click",zu,!0),e.addEventListener("focus",Vu,!0),e.addEventListener("blur",Bu,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),e.addEventListener("beforeunload",()=>{Wu(t)},{once:!0}),Vn.set(e,{focus:r})}const Wu=(t,e)=>{const n=gt(t),r=me(t);e&&r.removeEventListener("DOMContentLoaded",e),Vn.has(n)&&(n.HTMLElement.prototype.focus=Vn.get(n).focus,r.removeEventListener("keydown",Gr,!0),r.removeEventListener("keyup",Gr,!0),r.removeEventListener("click",zu,!0),n.removeEventListener("focus",Vu,!0),n.removeEventListener("blur",Bu,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Vn.delete(n))};function z2(t){const e=me(t);let n;return e.readyState!=="loading"?Oo(t):(n=()=>{Oo(t)},e.addEventListener("DOMContentLoaded",n)),()=>Wu(t,n)}typeof document<"u"&&z2();function Uu(){return xn!=="pointer"}function Gu(){return xn}const V2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function B2(t,e,n){var r;const i=typeof window<"u"?gt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?gt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?gt(n==null?void 0:n.target).HTMLElement:HTMLElement,l=typeof window<"u"?gt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!V2.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof l&&!j2[n.key])}function W2(t,e,n){Oo(),d.useEffect(()=>{let r=(i,o)=>{B2(!!(n!=null&&n.isTextInput),i,o)&&t(Uu())};return Po.add(r),()=>{Po.delete(r)}},e)}function U2(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),l=Hu(a),s=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,l(u))},[r,i,l]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:s,onBlur:a}}}function qr(t){const e=me(t);if(Gu()==="virtual"){let n=e.activeElement;I2(()=>{e.activeElement===n&&t.isConnected&&il(t)})}else il(t)}function G2(t){const e=gt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:a,visibility:l}=o(t);i=a!=="none"&&l!=="hidden"&&l!=="collapse"}return i}function q2(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function qu(t,e){return t.nodeName!=="#comment"&&G2(t)&&q2(t,e)&&(!t.parentElement||qu(t.parentElement,t))}const ll=d.createContext(null),_o="react-aria-focus-scope-restore";let ae=null;function Yu(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=d.useRef(null),a=d.useRef(null),l=d.useRef([]),{parentNode:s}=d.useContext(ll)||{},u=d.useMemo(()=>new ko({scopeRef:l}),[l]);De(()=>{let p=s||ue.root;if(ue.getTreeNode(p.scopeRef)&&ae&&!Yr(ae,p.scopeRef)){let g=ue.getTreeNode(ae);g&&(p=g)}p.addChild(u),ue.addNode(u)},[u,s]),De(()=>{let p=ue.getTreeNode(l);p&&(p.contain=!!n)},[n]),De(()=>{var p;let g=(p=o.current)===null||p===void 0?void 0:p.nextSibling,m=[],f=v=>v.stopPropagation();for(;g&&g!==a.current;)m.push(g),g.addEventListener(_o,f),g=g.nextSibling;return l.current=m,()=>{for(let v of m)v.removeEventListener(_o,f)}},[e]),th(l,r,n),J2(l,n),nh(l,r,n),eh(l,i),d.useEffect(()=>{const p=me(l.current?l.current[0]:void 0).activeElement;let g=null;if(Ke(p,l.current)){for(let m of ue.traverse())m.scopeRef&&Ke(p,m.scopeRef.current)&&(g=m);g===ue.getTreeNode(l)&&(ae=g.scopeRef)}},[l]),De(()=>()=>{var p,g,m;let f=(m=(g=ue.getTreeNode(l))===null||g===void 0||(p=g.parent)===null||p===void 0?void 0:p.scopeRef)!==null&&m!==void 0?m:null;(l===ae||Yr(l,ae))&&(!f||ue.getTreeNode(f))&&(ae=f),ue.removeTreeNode(l)},[l]);let c=d.useMemo(()=>Y2(l),[]),h=d.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return d.createElement(ll.Provider,{value:h},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function Y2(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,l=r||me(n[0]).activeElement,s=n[0].previousElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Ke(l,n)?l:s;let h=c.nextNode();return!h&&o&&(c.currentNode=s,h=c.nextNode()),h&&rt(h,!0),h},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,l=r||me(n[0]).activeElement,s=n[n.length-1].nextElementSibling,u=xt(n),c=qe(u,{tabbable:i,accept:a},n);c.currentNode=Ke(l,n)?l:s;let h=c.previousNode();return!h&&o&&(c.currentNode=s,h=c.previousNode()),h&&rt(h,!0),h},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let l=a.nextNode();return l&&rt(l,!0),l},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=xt(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let l=a.previousNode();return l&&rt(l,!0),l}}}const ga=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Z2=ga.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ga.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const X2=ga.join(':not([hidden]):not([tabindex="-1"]),');function xt(t){return t[0].parentElement}function An(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function J2(t,e){let n=d.useRef(void 0),r=d.useRef(void 0);De(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=me(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!An(t)||u.isComposing)return;let c=o.activeElement,h=t.current;if(!h||!Ke(c,h))return;let p=xt(h),g=qe(p,{tabbable:!0},h);if(!c)return;g.currentNode=c;let m=u.shiftKey?g.previousNode():g.nextNode();m||(g.currentNode=u.shiftKey?h[h.length-1].nextElementSibling:h[0].previousElementSibling,m=u.shiftKey?g.previousNode():g.nextNode()),u.preventDefault(),m&&rt(m,!0)},l=u=>{(!ae||Yr(ae,t))&&Ke(u.target,t.current)?(ae=t,n.current=u.target):An(t)&&!vt(u.target,t)?n.current?n.current.focus():ae&&ae.current&&Io(ae.current):An(t)&&(n.current=u.target)},s=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=Gu();if(!((c==="virtual"||c===null)&&Fu()&&_2())&&o.activeElement&&An(t)&&!vt(o.activeElement,t))if(ae=t,o.body.contains(u.target)){var p;n.current=u.target,(p=n.current)===null||p===void 0||p.focus()}else ae.current&&Io(ae.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",l,!1),i==null||i.forEach(u=>u.addEventListener("focusin",l,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",s,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",l,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",l,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",s,!1))}},[t,e]),De(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Zu(t){return vt(t)}function Ke(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function vt(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ue.traverse(ue.getTreeNode(e)))if(n&&Ke(t,n.current))return!0;return!1}function Q2(t){return vt(t,ae)}function Yr(t,e){var n;let r=(n=ue.getTreeNode(e))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function rt(t,e=!1){if(t!=null&&!e)try{qr(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Xu(t,e=!0){let n=t[0].previousElementSibling,r=xt(t),i=qe(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=xt(t),i=qe(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function Io(t,e=!0){rt(Xu(t,e))}function eh(t,e){const n=d.useRef(e);d.useEffect(()=>{if(n.current){ae=t;const r=me(t.current?t.current[0]:void 0);!Ke(r.activeElement,ae.current)&&t.current&&Io(t.current)}n.current=!1},[t])}function th(t,e,n){De(()=>{if(e||n)return;let r=t.current;const i=me(r?r[0]:void 0);let o=a=>{let l=a.target;Ke(l,t.current)?ae=t:Zu(l)||(ae=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function sl(t){let e=ue.getTreeNode(ae);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function nh(t,e,n){const r=d.useRef(typeof document<"u"?me(t.current?t.current[0]:void 0).activeElement:null);De(()=>{let i=t.current;const o=me(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ae||Yr(ae,t))&&Ke(o.activeElement,t.current)&&(ae=t)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(l=>l.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(l=>l.removeEventListener("focusin",a,!1))}},[t,n]),De(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!An(t)||a.isComposing)return;let l=i.activeElement;if(!vt(l,t)||!sl(t))return;let s=ue.getTreeNode(t);if(!s)return;let u=s.nodeToRestore,c=qe(i.body,{tabbable:!0});c.currentNode=l;let h=a.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,s.nodeToRestore=void 0),(!h||!vt(h,t))&&u){c.currentNode=u;do h=a.shiftKey?c.previousNode():c.nextNode();while(vt(h,t));a.preventDefault(),a.stopPropagation(),h?rt(h,!0):Zu(u)?rt(u,!0):l.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),De(()=>{const i=me(t.current?t.current[0]:void 0);if(!e)return;let o=ue.getTreeNode(t);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let l=ue.getTreeNode(t);if(!l)return;let s=l.nodeToRestore;if(e&&s&&(i.activeElement&&vt(i.activeElement,t)||i.activeElement===i.body&&sl(t))){let u=ue.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){ul(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&ue.getTreeNode(c.scopeRef)){let h=Xu(c.scopeRef.current,!0);ul(h);return}c=c.parent}}})}}}},[t,e])}function ul(t){t.dispatchEvent(new CustomEvent(_o,{bubbles:!0,cancelable:!0}))&&rt(t)}function qe(t,e,n){let r=e!=null&&e.tabbable?X2:Z2,i=me(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(e==null||(a=e.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&qu(o)&&(!n||Ke(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class va{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ko({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Ke(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new va;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let ue=new va;function hi(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=d.useRef({isFocused:!1,isFocusVisible:e||Uu()}),[o,a]=d.useState(!1),[l,s]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>s(i.current.isFocused&&i.current.isFocusVisible),[]),c=d.useCallback(g=>{i.current.isFocused=g,a(g),u()},[u]);W2(g=>{i.current.isFocusVisible=g,u()},[],{isTextInput:n});let{focusProps:h}=F2({isDisabled:r,onFocusChange:c}),{focusWithinProps:p}=U2({isDisabled:!r,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:l,focusProps:r?p:h}}function rh(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=d.useState(!1);return De(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let l=qe(t.current,{tabbable:!0});i(!!l.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}let un="default",No="",kr=new WeakMap;function cl(t){if(di()){if(un==="default"){const e=Me(t);No=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}un="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(kr.set(t,t.style.userSelect),t.style.userSelect="none")}function gr(t){if(di()){if(un!=="disabled")return;un="restoring",setTimeout(()=>{Z0(()=>{if(un==="restoring"){const e=Me(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=No||""),No="",un="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&kr.has(t)){let e=kr.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),kr.delete(t)}}const ma=d.createContext({register:()=>{}});ma.displayName="PressResponderContext";function ih(t){let e=d.useContext(ma);if(e){let{register:n,...r}=e;t=ye(r,t),n()}return J0(e,t.ref),t}var vr=new WeakMap;class mr{continuePropagation(){al(this,vr,!1)}get shouldStopPropagation(){return R2(this,vr)}constructor(e,n,r,i){M2(this,vr,{writable:!0,value:void 0}),al(this,vr,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const l=a==null?void 0:a.getBoundingClientRect();let s,u=0,c,h=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,h=r.clientY),l&&(c!=null&&h!=null?(s=c-l.left,u=h-l.top):(s=l.width/2,u=l.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=u}}const dl=Symbol("linkClicked");function ya(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:l,preventFocusOnPress:s,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:h,...p}=ih(t),[g,m]=d.useState(!1),f=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:v,removeAllGlobalListeners:y}=Du(),C=Pe((b,k)=>{let V=f.current;if(a||V.didFirePressStart)return!1;let R=!0;if(V.isTriggeringEvent=!0,r){let H=new mr("pressstart",k,b);r(H),R=H.shouldStopPropagation}return n&&n(!0),V.isTriggeringEvent=!1,V.didFirePressStart=!0,m(!0),R}),S=Pe((b,k,V=!0)=>{let R=f.current;if(!R.didFirePressStart)return!1;R.ignoreClickAfterPress=!0,R.didFirePressStart=!1,R.isTriggeringEvent=!0;let H=!0;if(i){let E=new mr("pressend",k,b);i(E),H=E.shouldStopPropagation}if(n&&n(!1),m(!1),e&&V&&!a){let E=new mr("press",k,b);e(E),H&&(H=E.shouldStopPropagation)}return R.isTriggeringEvent=!1,H}),P=Pe((b,k)=>{let V=f.current;if(a)return!1;if(o){V.isTriggeringEvent=!0;let R=new mr("pressup",k,b);return o(R),V.isTriggeringEvent=!1,R.shouldStopPropagation}return!0}),x=Pe(b=>{let k=f.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&S(Je(k.target,b),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,y(),c||gr(k.target))}),O=Pe(b=>{u&&x(b)}),D=d.useMemo(()=>{let b=f.current,k={onKeyDown(R){if(Li(R.nativeEvent,R.currentTarget)&&R.currentTarget.contains(R.target)){var H;hl(R.target,R.key)&&R.preventDefault();let E=!0;if(!b.isPressed&&!R.repeat){b.target=R.currentTarget,b.isPressed=!0,E=C(R,"keyboard");let I=R.currentTarget,j=W=>{Li(W,I)&&!W.repeat&&I.contains(W.target)&&b.target&&P(Je(b.target,W),"keyboard")};v(Me(R.currentTarget),"keyup",Un(j,V),!0)}E&&R.stopPropagation(),R.metaKey&&It()&&((H=b.metaKeyEvents)===null||H===void 0||H.set(R.key,R.nativeEvent))}else R.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(R){if(!(R&&!R.currentTarget.contains(R.target))&&R&&R.button===0&&!b.isTriggeringEvent&&!kt.isOpening){let H=!0;if(a&&R.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||Eo(R.nativeEvent))){!a&&!s&&$t(R.currentTarget);let E=C(R,"virtual"),I=P(R,"virtual"),j=S(R,"virtual");H=E&&I&&j}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,H&&R.stopPropagation()}}},V=R=>{var H;if(b.isPressed&&b.target&&Li(R,b.target)){var E;hl(R.target,R.key)&&R.preventDefault();let j=R.target;S(Je(b.target,R),"keyboard",b.target.contains(j)),y(),R.key!=="Enter"&&ba(b.target)&&b.target.contains(j)&&!R[dl]&&(R[dl]=!0,kt(b.target,R,!1)),b.isPressed=!1,(E=b.metaKeyEvents)===null||E===void 0||E.delete(R.key)}else if(R.key==="Meta"&&(!((H=b.metaKeyEvents)===null||H===void 0)&&H.size)){var I;let j=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let W of j.values())(I=b.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",W))}};if(typeof PointerEvent<"u"){k.onPointerDown=I=>{if(I.button!==0||!I.currentTarget.contains(I.target))return;if(n2(I.nativeEvent)){b.pointerType="virtual";return}Ai(I.currentTarget)&&I.preventDefault(),b.pointerType=I.pointerType;let j=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=I.pointerId,b.target=I.currentTarget,!a&&!s&&$t(I.currentTarget),c||cl(b.target),j=C(I,b.pointerType);let W=I.target;"releasePointerCapture"in W&&W.releasePointerCapture(I.pointerId),v(Me(I.currentTarget),"pointerup",R,!1),v(Me(I.currentTarget),"pointercancel",E,!1)}j&&I.stopPropagation()},k.onMouseDown=I=>{I.currentTarget.contains(I.target)&&I.button===0&&(Ai(I.currentTarget)&&I.preventDefault(),I.stopPropagation())},k.onPointerUp=I=>{!I.currentTarget.contains(I.target)||b.pointerType==="virtual"||I.button===0&&P(I,b.pointerType||I.pointerType)},k.onPointerEnter=I=>{I.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,C(Je(b.target,I),b.pointerType))},k.onPointerLeave=I=>{I.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,S(Je(b.target,I),b.pointerType,!1),O(I))};let R=I=>{I.pointerId===b.activePointerId&&b.isPressed&&I.button===0&&b.target&&(b.target.contains(I.target)&&b.pointerType!=null?S(Je(b.target,I),b.pointerType):b.isOverTarget&&b.pointerType!=null&&S(Je(b.target,I),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,y(),c||gr(b.target),"ontouchend"in b.target&&I.pointerType!=="mouse"&&v(b.target,"touchend",H,{once:!0}))},H=I=>{Ju(I.currentTarget)&&I.preventDefault()},E=I=>{x(I)};k.onDragStart=I=>{I.currentTarget.contains(I.target)&&x(I)}}else{k.onMouseDown=E=>{if(E.button!==0||!E.currentTarget.contains(E.target))return;if(Ai(E.currentTarget)&&E.preventDefault(),b.ignoreEmulatedMouseEvents){E.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=E.currentTarget,b.pointerType=Eo(E.nativeEvent)?"virtual":"mouse",!a&&!s&&$t(E.currentTarget),C(E,b.pointerType)&&E.stopPropagation(),v(Me(E.currentTarget),"mouseup",R,!1)},k.onMouseEnter=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,I=C(E,b.pointerType)),I&&E.stopPropagation()},k.onMouseLeave=E=>{if(!E.currentTarget.contains(E.target))return;let I=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,I=S(E,b.pointerType,!1),O(E)),I&&E.stopPropagation()},k.onMouseUp=E=>{E.currentTarget.contains(E.target)&&!b.ignoreEmulatedMouseEvents&&E.button===0&&P(E,b.pointerType||"mouse")};let R=E=>{if(E.button===0){if(b.isPressed=!1,y(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&Mi(E,b.target)&&b.pointerType!=null?S(Je(b.target,E),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&S(Je(b.target,E),b.pointerType,!1),b.isOverTarget=!1}};k.onTouchStart=E=>{if(!E.currentTarget.contains(E.target))return;let I=oh(E.nativeEvent);if(!I)return;b.activePointerId=I.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=E.currentTarget,b.pointerType="touch",!a&&!s&&$t(E.currentTarget),c||cl(b.target),C(ut(b.target,E),b.pointerType)&&E.stopPropagation(),v(yn(E.currentTarget),"scroll",H,!0)},k.onTouchMove=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=fl(E.nativeEvent,b.activePointerId),j=!0;I&&Mi(I,E.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,j=C(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,j=S(ut(b.target,E),b.pointerType,!1),O(ut(b.target,E))),j&&E.stopPropagation()},k.onTouchEnd=E=>{if(!E.currentTarget.contains(E.target))return;if(!b.isPressed){E.stopPropagation();return}let I=fl(E.nativeEvent,b.activePointerId),j=!0;I&&Mi(I,E.currentTarget)&&b.pointerType!=null?(P(ut(b.target,E),b.pointerType),j=S(ut(b.target,E),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(j=S(ut(b.target,E),b.pointerType,!1)),j&&E.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!c&&gr(b.target),y()},k.onTouchCancel=E=>{E.currentTarget.contains(E.target)&&(E.stopPropagation(),b.isPressed&&x(ut(b.target,E)))};let H=E=>{b.isPressed&&E.target.contains(b.target)&&x({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=E=>{E.currentTarget.contains(E.target)&&x(E)}}return k},[v,a,s,y,c,x,O,S,C,P]);return d.useEffect(()=>()=>{var b;c||gr((b=f.current.target)!==null&&b!==void 0?b:void 0)},[c]),{isPressed:l||g,pressProps:ye(p,D)}}function ba(t){return t.tagName==="A"&&t.hasAttribute("href")}function Li(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof yn(i).HTMLInputElement&&!Qu(i,n)||i instanceof yn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&ba(i))&&n!=="Enter")}function oh(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function fl(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function ut(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function Je(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function ah(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function lh(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Mi(t,e){let n=e.getBoundingClientRect(),r=ah(t);return lh(n,r)}function Ai(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Ju(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!ba(t)}function hl(t,e){return t instanceof HTMLInputElement?!Qu(t,e):Ju(t)}const sh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Qu(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":sh.has(t.type)}function uh({children:t}){let e=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(ma.Provider,{value:e},t)}class ch{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function ec(t){let e=d.useRef({isFocused:!1,observer:null});pe(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Pe(r=>{t==null||t(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=a=>{e.current.isFocused=!1,i.disabled&&n(new ch("blur",a)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var a;(a=e.current.observer)===null||a===void 0||a.disconnect();let l=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function dh(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=d.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),i&&i(!1),!0},[r,i]),a=ec(o),l=d.useCallback(s=>{const u=Me(s.target);s.target===s.currentTarget&&u.activeElement===s.target&&(n&&n(s),i&&i(!0),a(s))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?l:void 0,onBlur:!e&&(r||i)?o:void 0}}}let Tn=null,fh=new Set,Bn=new Map,Rt=!1,Ro=!1;function Sa(t,e){for(let n of fh)n(t,e)}function hh(t){return!(t.metaKey||!It()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Zr(t){Rt=!0,hh(t)&&(Tn="keyboard",Sa("keyboard",t))}function Re(t){Tn="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Rt=!0,Sa("pointer",t))}function tc(t){Eo(t)&&(Rt=!0,Tn="virtual")}function nc(t){t.target===window||t.target===document||(!Rt&&!Ro&&(Tn="virtual",Sa("virtual",t)),Rt=!1,Ro=!1)}function rc(){Rt=!1,Ro=!0}function pl(t){if(typeof window>"u"||Bn.get(yn(t)))return;const e=yn(t),n=Me(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Rt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Zr,!0),n.addEventListener("keyup",Zr,!0),n.addEventListener("click",tc,!0),e.addEventListener("focus",nc,!0),e.addEventListener("blur",rc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Re,!0),n.addEventListener("pointermove",Re,!0),n.addEventListener("pointerup",Re,!0)):(n.addEventListener("mousedown",Re,!0),n.addEventListener("mousemove",Re,!0),n.addEventListener("mouseup",Re,!0)),e.addEventListener("beforeunload",()=>{ic(t)},{once:!0}),Bn.set(e,{focus:r})}const ic=(t,e)=>{const n=yn(t),r=Me(t);e&&r.removeEventListener("DOMContentLoaded",e),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Zr,!0),r.removeEventListener("keyup",Zr,!0),r.removeEventListener("click",tc,!0),n.removeEventListener("focus",nc,!0),n.removeEventListener("blur",rc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Re,!0),r.removeEventListener("pointermove",Re,!0),r.removeEventListener("pointerup",Re,!0)):(r.removeEventListener("mousedown",Re,!0),r.removeEventListener("mousemove",Re,!0),r.removeEventListener("mouseup",Re,!0)),Bn.delete(n))};function ph(t){const e=Me(t);let n;return e.readyState!=="loading"?pl(t):(n=()=>{pl(t)},e.addEventListener("DOMContentLoaded",n)),()=>ic(t,n)}typeof document<"u"&&ph();function gh(){return Tn!=="pointer"}function gl(){return Tn}function oc(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=d.useRef({isFocusWithin:!1}),a=d.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),l=ec(a),s=d.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,l(u))},[r,i,l]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:s,onBlur:a}}}let Xr=!1,Ki=0;function Lo(){Xr=!0,setTimeout(()=>{Xr=!1},50)}function vl(t){t.pointerType==="touch"&&Lo()}function vh(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",vl):document.addEventListener("touchend",Lo),Ki++,()=>{Ki--,!(Ki>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",vl):document.removeEventListener("touchend",Lo))}}function Ca(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=d.useState(!1),l=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(vh,[]);let{hoverProps:s,triggerHoverEnd:u}=d.useMemo(()=>{let c=(g,m)=>{if(l.pointerType=m,i||m==="touch"||l.isHovered||!g.currentTarget.contains(g.target))return;l.isHovered=!0;let f=g.currentTarget;l.target=f,e&&e({type:"hoverstart",target:f,pointerType:m}),n&&n(!0),a(!0)},h=(g,m)=>{if(l.pointerType="",l.target=null,m==="touch"||!l.isHovered)return;l.isHovered=!1;let f=g.currentTarget;r&&r({type:"hoverend",target:f,pointerType:m}),n&&n(!1),a(!1)},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Xr&&g.pointerType==="mouse"||c(g,g.pointerType)},p.onPointerLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):(p.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!l.ignoreEmulatedMouseEvents&&!Xr&&c(g,"mouse"),l.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!i&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:p,triggerHoverEnd:h}},[e,n,r,i,l]);return d.useEffect(()=>{i&&u({currentTarget:l.target},l.pointerType)},[i]),{hoverProps:s,isHovered:o}}function mh(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Pe(s=>{n&&yr(s,e)&&(i&&i(s),o.current.isPointerDown=!0)}),l=Pe(s=>{n&&n(s)});d.useEffect(()=>{let s=o.current;if(r)return;const u=e.current,c=Me(u);if(typeof PointerEvent<"u"){let h=p=>{s.isPointerDown&&yr(p,e)&&l(p),s.isPointerDown=!1};return c.addEventListener("pointerdown",a,!0),c.addEventListener("pointerup",h,!0),()=>{c.removeEventListener("pointerdown",a,!0),c.removeEventListener("pointerup",h,!0)}}else{let h=g=>{s.ignoreEmulatedMouseEvents?s.ignoreEmulatedMouseEvents=!1:s.isPointerDown&&yr(g,e)&&l(g),s.isPointerDown=!1},p=g=>{s.ignoreEmulatedMouseEvents=!0,s.isPointerDown&&yr(g,e)&&l(g),s.isPointerDown=!1};return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",h,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",p,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",h,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",p,!0)}}},[e,r,a,l])}function yr(t,e){if(t.button>0)return!1;if(t.target){const n=t.target.ownerDocument;if(!n||!n.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function ml(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function yh(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:ml(t.onKeyDown),onKeyUp:ml(t.onKeyUp)}}}const bh=500;function Sh(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=bh,accessibilityDescription:a}=t;const l=d.useRef(void 0);let{addGlobalListener:s,removeGlobalListener:u}=Du(),{pressProps:c}=ya({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(n&&n({...p,type:"longpressstart"}),l.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...p,type:"longpress"}),l.current=void 0},o),p.pointerType==="touch")){let g=m=>{m.preventDefault()};s(p.target,"contextmenu",g,{once:!0}),s(window,"pointerup",()=>{setTimeout(()=>{u(p.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(p){l.current&&clearTimeout(l.current),r&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r({...p,type:"longpressend"})}}),h=t2(i&&!e?a:void 0);return{longPressProps:ye(c,h)}}const Ch=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),wh=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Eh(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Ch.has(n.script)}let e=t.split("-")[0];return wh.has(e)}const $h=Symbol.for("react-aria.i18n.locale");function ac(){let t=typeof window<"u"&&window[$h]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Eh(t)?"rtl":"ltr"}}let Mo=ac(),Kn=new Set;function yl(){Mo=ac();for(let t of Kn)t(Mo)}function xh(){let t=En(),[e,n]=d.useState(Mo);return d.useEffect(()=>(Kn.size===0&&window.addEventListener("languagechange",yl),Kn.add(n),()=>{Kn.delete(n),Kn.size===0&&window.removeEventListener("languagechange",yl)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const Th=d.createContext(null);function or(){let t=xh();return d.useContext(Th)||t}var Ge=function(){return Ge=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ge.apply(this,arguments)};function lc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Ph(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}const Dh=Symbol.for("react-aria.i18n.locale"),Oh=Symbol.for("react-aria.i18n.strings");let Wt;class pi{getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=_h(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Dh];if(Wt===void 0){let i=window[Oh];if(!i)return null;Wt={};for(let o in i)Wt[o]=new pi({[n]:i[o]},n)}let r=Wt==null?void 0:Wt[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}}function _h(t,e,n="en-US"){if(e[t])return e[t];let r=Ih(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Ih(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const bl=new Map,Sl=new Map;class kh{format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=bl.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),bl.set(o,a));let l=a.select(e);return i=n[l]||n.other,typeof i=="function"?i():i}number(e){let n=Sl.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Sl.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}constructor(e,n){this.locale=e,this.strings=n}}const Cl=new WeakMap;function Nh(t){let e=Cl.get(t);return e||(e=new pi(t),Cl.set(t,e)),e}function Rh(t,e){return e&&pi.getGlobalDictionaryForPackage(e)||Nh(t)}function Lh(t,e){let{locale:n}=or(),r=Rh(t,e);return d.useMemo(()=>new kh(n,r),[n,r])}let Fi=new Map;function Mh(t){let{locale:e}=or(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Fi.has(n))return Fi.get(n);let r=new Intl.Collator(e,t);return Fi.set(n,r),r}const wl={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Ah(t={}){let{style:e,isFocusable:n}=t,[r,i]=d.useState(!1),{focusWithinProps:o}=oc({isDisabled:!n,onFocusWithinChange:l=>i(l)}),a=d.useMemo(()=>r?e:e?{...wl,...e}:wl,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Kh(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=Ah(t);return d.createElement(n,ye(o,a),e)}const Ye={top:"top",bottom:"top",left:"left",right:"left"},Jr={top:"bottom",bottom:"top",left:"right",right:"left"},Fh={top:"left",left:"top"},Ao={top:"height",left:"width"},sc={width:"totalWidth",height:"totalHeight"},br={};let fe=typeof document<"u"?window.visualViewport:null;function El(t){let e=0,n=0,r=0,i=0,o=0,a=0,l={};var s;let u=((s=fe==null?void 0:fe.scale)!==null&&s!==void 0?s:1)>1;if(t.tagName==="BODY"){let m=document.documentElement;r=m.clientWidth,i=m.clientHeight;var c;e=(c=fe==null?void 0:fe.width)!==null&&c!==void 0?c:r;var h;n=(h=fe==null?void 0:fe.height)!==null&&h!==void 0?h:i,l.top=m.scrollTop||t.scrollTop,l.left=m.scrollLeft||t.scrollLeft,fe&&(o=fe.offsetTop,a=fe.offsetLeft)}else({width:e,height:n,top:o,left:a}=hn(t)),l.top=t.scrollTop,l.left=t.scrollLeft,r=e,i=n;if(xu()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u){l.top=0,l.left=0;var p;o=(p=fe==null?void 0:fe.pageTop)!==null&&p!==void 0?p:0;var g;a=(g=fe==null?void 0:fe.pageLeft)!==null&&g!==void 0?g:0}return{width:e,height:n,totalWidth:r,totalHeight:i,scroll:l,top:o,left:a}}function jh(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function $l(t,e,n,r,i,o,a){var l;let s=(l=i.scroll[t])!==null&&l!==void 0?l:0,u=r[Ao[t]],c=r.scroll[Ye[t]]+o,h=u+r.scroll[Ye[t]]-o,p=e-s+a[t]-r[Ye[t]],g=e-s+n+a[t]-r[Ye[t]];return p<c?c-p:g>h?Math.max(h-g,c-p):0}function Hh(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function xl(t){if(br[t])return br[t];let[e,n]=t.split(" "),r=Ye[e]||"right",i=Fh[r];Ye[n]||(n="center");let o=Ao[r],a=Ao[i];return br[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},br[t]}function ji(t,e,n,r,i,o,a,l,s,u){let{placement:c,crossPlacement:h,axis:p,crossAxis:g,size:m,crossSize:f}=r,v={};var y;v[g]=(y=t[g])!==null&&y!==void 0?y:0;var C,S,P,x;h==="center"?v[g]+=(((C=t[f])!==null&&C!==void 0?C:0)-((S=n[f])!==null&&S!==void 0?S:0))/2:h!==g&&(v[g]+=((P=t[f])!==null&&P!==void 0?P:0)-((x=n[f])!==null&&x!==void 0?x:0)),v[g]+=o;const O=t[g]-n[f]+s+u,D=t[g]+t[f]-s-u;if(v[g]=$o(v[g],O,D),c===p){const b=l?a[m]:e[sc[m]];v[Jr[p]]=Math.floor(b-t[p]+i)}else v[p]=Math.floor(t[p]+t[m]+i);return v}function zh(t,e,n,r,i,o,a,l){const s=r?n.height:e[sc.height];var u;let c=t.top!=null?n.top+t.top:n.top+(s-((u=t.bottom)!==null&&u!==void 0?u:0)-a);var h,p,g,m,f,v;let y=l!=="top"?Math.max(0,e.height+e.top+((h=e.scroll.top)!==null&&h!==void 0?h:0)-c-(((p=i.top)!==null&&p!==void 0?p:0)+((g=i.bottom)!==null&&g!==void 0?g:0)+o)):Math.max(0,c+a-(e.top+((m=e.scroll.top)!==null&&m!==void 0?m:0))-(((f=i.top)!==null&&f!==void 0?f:0)+((v=i.bottom)!==null&&v!==void 0?v:0)+o));return Math.min(e.height-o*2,y)}function Tl(t,e,n,r,i,o){let{placement:a,axis:l,size:s}=o;var u,c;if(a===l)return Math.max(0,n[l]-t[l]-((u=t.scroll[l])!==null&&u!==void 0?u:0)+e[l]-((c=r[l])!==null&&c!==void 0?c:0)-r[Jr[l]]-i);var h;return Math.max(0,t[s]+t[l]+t.scroll[l]-e[l]-n[l]-n[s]-((h=r[l])!==null&&h!==void 0?h:0)-r[Jr[l]]-i)}function Vh(t,e,n,r,i,o,a,l,s,u,c,h,p,g,m,f){let v=xl(t),{size:y,crossAxis:C,crossSize:S,placement:P,crossPlacement:x}=v,O=ji(e,l,n,v,c,h,u,p,m,f),D=c,b=Tl(l,u,e,i,o+c,v);if(a&&r[y]>b){let K=xl(`${Jr[P]} ${x}`),A=ji(e,l,n,K,c,h,u,p,m,f);Tl(l,u,e,i,o+c,K)>b&&(v=K,O=A,D=c)}let k="bottom";v.axis==="top"?v.placement==="top"?k="top":v.placement==="bottom"&&(k="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?k="bottom":v.crossPlacement==="bottom"&&(k="top"));let V=$l(C,O[C],n[S],l,s,o,u);O[C]+=V;let R=zh(O,l,u,p,i,o,n.height,k);g&&g<R&&(R=g),n.height=Math.min(n.height,R),O=ji(e,l,n,v,D,h,u,p,m,f),V=$l(C,O[C],n[S],l,s,o,u),O[C]+=V;let H={},E=e[C]+.5*e[S]-O[C]-i[Ye[C]];const I=m/2+f;var j,W,Z,_;const M=Ye[C]==="left"?((j=i.left)!==null&&j!==void 0?j:0)+((W=i.right)!==null&&W!==void 0?W:0):((Z=i.top)!==null&&Z!==void 0?Z:0)+((_=i.bottom)!==null&&_!==void 0?_:0),G=n[S]-M-m/2-f,Y=e[C]+m/2-(O[C]+i[Ye[C]]),L=e[C]+e[S]-m/2-(O[C]+i[Ye[C]]),N=$o(E,Y,L);return H[C]=$o(N,I,G),{position:O,maxHeight:R,arrowOffsetLeft:H.left,arrowOffsetTop:H.top,placement:v.placement}}function Bh(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:l,offset:s,crossOffset:u,maxHeight:c,arrowSize:h=0,arrowBoundaryOffset:p=0}=t,g=r instanceof HTMLElement?Wh(r):document.documentElement,m=g===document.documentElement;const f=window.getComputedStyle(g).position;let v=!!f&&f!=="static",y=m?hn(n):Pl(n,g);if(!m){let{marginTop:H,marginLeft:E}=window.getComputedStyle(n);y.top+=parseInt(H,10)||0,y.left+=parseInt(E,10)||0}let C=hn(r),S=Hh(r);var P,x;C.width+=((P=S.left)!==null&&P!==void 0?P:0)+((x=S.right)!==null&&x!==void 0?x:0);var O,D;C.height+=((O=S.top)!==null&&O!==void 0?O:0)+((D=S.bottom)!==null&&D!==void 0?D:0);let b=jh(i),k=El(l),V=El(g),R=l.tagName==="BODY"?hn(g):Pl(g,l);return g.tagName==="HTML"&&l.tagName==="BODY"&&(V.scroll.top=0,V.scroll.left=0),Vh(e,y,C,b,S,o,a,k,V,R,s,u,v,c,h,p)}function hn(t){let{top:e,left:n,width:r,height:i}=t.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:l,clientLeft:s}=document.documentElement;return{top:e+o-l,left:n+a-s,width:r,height:i}}function Pl(t,e){let n=window.getComputedStyle(t),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:l}=t.getBoundingClientRect();r={top:i,left:o,width:a,height:l}}else{r=hn(t);let i=hn(e),o=window.getComputedStyle(e);i.top+=(parseInt(o.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-e.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function Wh(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Dl(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Dl(e);)e=e.parentElement;return e||document.documentElement}function Dl(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Uh=new WeakMap;function Gh(t){let{triggerRef:e,isOpen:n,onClose:r}=t;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!e.current||a instanceof Node&&!a.contains(e.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let l=r||Uh.get(e.current);l&&l()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}let se=typeof document<"u"?window.visualViewport:null;function qh(t){let{direction:e}=or(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:l=12,shouldFlip:s=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:h=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:m,maxHeight:f,arrowBoundaryOffset:v=0}=t,[y,C]=d.useState(null),S=[p,a,i.current,r.current,o.current,l,s,u,c,h,g,e,f,v,n],P=d.useRef(se==null?void 0:se.scale);d.useEffect(()=>{g&&(P.current=se==null?void 0:se.scale)},[g]);let x=d.useCallback(()=>{if(p===!1||!g||!i.current||!r.current||!u||(se==null?void 0:se.scale)!==P.current)return;let V=null;if(o.current&&o.current.contains(document.activeElement)){var R;let _=(R=document.activeElement)===null||R===void 0?void 0:R.getBoundingClientRect(),M=o.current.getBoundingClientRect();var H;if(V={type:"top",offset:((H=_==null?void 0:_.top)!==null&&H!==void 0?H:0)-M.top},V.offset>M.height/2){V.type="bottom";var E;V.offset=((E=_==null?void 0:_.bottom)!==null&&E!==void 0?E:0)-M.bottom}}let I=i.current;if(!f&&i.current){var j;I.style.top="0px",I.style.bottom="";var W;I.style.maxHeight=((W=(j=window.visualViewport)===null||j===void 0?void 0:j.height)!==null&&W!==void 0?W:window.innerHeight)+"px"}let Z=Bh({placement:Zh(a,e),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:l,shouldFlip:s,boundaryElement:u,offset:c,crossOffset:h,maxHeight:f,arrowSize:n,arrowBoundaryOffset:v});if(Z.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(Z.position).forEach(_=>I.style[_]=Z.position[_]+"px"),I.style.maxHeight=Z.maxHeight!=null?Z.maxHeight+"px":"",V&&document.activeElement&&o.current){let _=document.activeElement.getBoundingClientRect(),M=o.current.getBoundingClientRect(),G=_[V.type]-M[V.type];o.current.scrollTop+=G-V.offset}C(Z)}},S);pe(x,S),Yh(x),Za({ref:i,onResize:x}),Za({ref:r,onResize:x});let O=d.useRef(!1);pe(()=>{let V,R=()=>{O.current=!0,clearTimeout(V),V=setTimeout(()=>{O.current=!1},500),x()},H=()=>{O.current&&R()};return se==null||se.addEventListener("resize",R),se==null||se.addEventListener("scroll",H),()=>{se==null||se.removeEventListener("resize",R),se==null||se.removeEventListener("scroll",H)}},[x]);let D=d.useCallback(()=>{O.current||m==null||m()},[m,O]);Gh({triggerRef:r,isOpen:g,onClose:m&&D});var b,k;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...y==null?void 0:y.position,maxHeight:(b=y==null?void 0:y.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(k=y==null?void 0:y.placement)!==null&&k!==void 0?k:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:y==null?void 0:y.arrowOffsetLeft,top:y==null?void 0:y.arrowOffsetTop}},updatePosition:x}}function Yh(t){pe(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Zh(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Qe=[];function Xh(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:l}=t;d.useEffect(()=>(i&&Qe.push(e),()=>{let m=Qe.indexOf(e);m>=0&&Qe.splice(m,1)}),[i,e]);let s=()=>{Qe[Qe.length-1]===e&&n&&n()},u=m=>{(!l||l(m.target))&&Qe[Qe.length-1]===e&&(m.stopPropagation(),m.preventDefault())},c=m=>{(!l||l(m.target))&&(Qe[Qe.length-1]===e&&(m.stopPropagation(),m.preventDefault()),s())},h=m=>{m.key==="Escape"&&!a&&!m.nativeEvent.isComposing&&(m.stopPropagation(),m.preventDefault(),s())};mh({ref:e,onInteractOutside:o&&i?c:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=oc({isDisabled:!r,onBlurWithin:m=>{!m.relatedTarget||Q2(m.relatedTarget)||(!l||l(m.relatedTarget))&&(n==null||n())}}),g=m=>{m.target===m.currentTarget&&m.preventDefault()};return{overlayProps:{onKeyDown:h,...p},underlayProps:{onPointerDown:g}}}const Hi=typeof document<"u"&&window.visualViewport,Jh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Sr=0,zi;function Qh(t={}){let{isDisabled:e}=t;pe(()=>{if(!e)return Sr++,Sr===1&&(di()?zi=tp():zi=ep()),()=>{Sr--,Sr===0&&zi()}},[e])}function ep(){return Un(cn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),cn(document.documentElement,"overflow","hidden"))}function tp(){let t,e,n=u=>{t=Ou(u.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=cn(t,"overscrollBehavior","contain"))},r=u=>{if(!t||t===document.documentElement||t===document.body){u.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&u.preventDefault()},i=()=>{e&&e()},o=u=>{let c=u.target;np(c)&&(l(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Hi&&(Hi.height<window.innerHeight?requestAnimationFrame(()=>{Ol(c)}):Hi.addEventListener("resize",()=>Ol(c),{once:!0}))}))},a=null,l=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,h=window.pageYOffset;a=Un(In(window,"scroll",u),cn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),cn(document.documentElement,"overflow","hidden"),cn(document.body,"marginTop",`-${h}px`),()=>{window.scrollTo(c,h)}),window.scrollTo(0,0)},s=Un(In(document,"touchstart",n,{passive:!1,capture:!0}),In(document,"touchmove",r,{passive:!1,capture:!0}),In(document,"touchend",i,{passive:!1,capture:!0}),In(document,"focus",o,!0));return()=>{e==null||e(),a==null||a(),s()}}function cn(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function In(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ol(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Ou(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function np(t){return t instanceof HTMLInputElement&&!Jh.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}var uc={};uc={dismiss:"تجاهل"};var cc={};cc={dismiss:"Отхвърляне"};var dc={};dc={dismiss:"Odstranit"};var fc={};fc={dismiss:"Luk"};var hc={};hc={dismiss:"Schließen"};var pc={};pc={dismiss:"Απόρριψη"};var gc={};gc={dismiss:"Dismiss"};var vc={};vc={dismiss:"Descartar"};var mc={};mc={dismiss:"Lõpeta"};var yc={};yc={dismiss:"Hylkää"};var bc={};bc={dismiss:"Rejeter"};var Sc={};Sc={dismiss:"התעלם"};var Cc={};Cc={dismiss:"Odbaci"};var wc={};wc={dismiss:"Elutasítás"};var Ec={};Ec={dismiss:"Ignora"};var $c={};$c={dismiss:"閉じる"};var xc={};xc={dismiss:"무시"};var Tc={};Tc={dismiss:"Atmesti"};var Pc={};Pc={dismiss:"Nerādīt"};var Dc={};Dc={dismiss:"Lukk"};var Oc={};Oc={dismiss:"Negeren"};var _c={};_c={dismiss:"Zignoruj"};var Ic={};Ic={dismiss:"Descartar"};var kc={};kc={dismiss:"Dispensar"};var Nc={};Nc={dismiss:"Revocare"};var Rc={};Rc={dismiss:"Пропустить"};var Lc={};Lc={dismiss:"Zrušiť"};var Mc={};Mc={dismiss:"Opusti"};var Ac={};Ac={dismiss:"Odbaci"};var Kc={};Kc={dismiss:"Avvisa"};var Fc={};Fc={dismiss:"Kapat"};var jc={};jc={dismiss:"Скасувати"};var Hc={};Hc={dismiss:"取消"};var zc={};zc={dismiss:"關閉"};var Vc={};Vc={"ar-AE":uc,"bg-BG":cc,"cs-CZ":dc,"da-DK":fc,"de-DE":hc,"el-GR":pc,"en-US":gc,"es-ES":vc,"et-EE":mc,"fi-FI":yc,"fr-FR":bc,"he-IL":Sc,"hr-HR":Cc,"hu-HU":wc,"it-IT":Ec,"ja-JP":$c,"ko-KR":xc,"lt-LT":Tc,"lv-LV":Pc,"nb-NO":Dc,"nl-NL":Oc,"pl-PL":_c,"pt-BR":Ic,"pt-PT":kc,"ro-RO":Nc,"ru-RU":Rc,"sk-SK":Lc,"sl-SI":Mc,"sr-SP":Ac,"sv-SE":Kc,"tr-TR":Fc,"uk-UA":jc,"zh-CN":Hc,"zh-TW":zc};function rp(t){return t&&t.__esModule?t.default:t}function _l(t){let{onDismiss:e,...n}=t,r=Lh(rp(Vc),"@react-aria/overlays"),i=la(n,r.format("dismiss")),o=()=>{e&&e()};return d.createElement(Kh,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let kn=new WeakMap,_e=[];function ip(t,e=document.body){let n=new Set(t),r=new Set,i=s=>{for(let p of s.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(p);let u=p=>{if(n.has(p)||p.parentElement&&r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let g of n)if(p.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),h=u(s);if(h===NodeFilter.FILTER_ACCEPT&&o(s),h!==NodeFilter.FILTER_REJECT){let p=c.nextNode();for(;p!=null;)o(p),p=c.nextNode()}},o=s=>{var u;let c=(u=kn.get(s))!==null&&u!==void 0?u:0;s.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&s.setAttribute("aria-hidden","true"),r.add(s),kn.set(s,c+1))};_e.length&&_e[_e.length-1].disconnect(),i(e);let a=new MutationObserver(s=>{for(let u of s)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});a.observe(e,{childList:!0,subtree:!0});let l={observe(){a.observe(e,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return _e.push(l),()=>{a.disconnect();for(let s of r){let u=kn.get(s);u!=null&&(u===1?(s.removeAttribute("aria-hidden"),kn.delete(s)):kn.set(s,u-1))}l===_e[_e.length-1]?(_e.pop(),_e.length&&_e[_e.length-1].observe()):_e.splice(_e.indexOf(l),1)}}function op(t,e){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...l}=t,{overlayProps:s,underlayProps:u}=Xh({isOpen:e.isOpen&&!l["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:c,arrowProps:h,placement:p}=qh({...l,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i?e.close:null});return Qh({isDisabled:i||!e.isOpen}),pe(()=>{if(e.isOpen&&!i&&r.current)return ip([r.current])},[i,e.isOpen,r]),{popoverProps:ye(s,c),arrowProps:h,underlayProps:u,placement:p}}const ap=d.createContext({});function lp(){var t;return(t=d.useContext(ap))!==null&&t!==void 0?t:{}}const sp=d.createContext(null);function up(t){let e=En(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:l}=lp();if(!t.portalContainer&&l&&(n=l()),!n)return null;let s=t.children;return t.disableFocusManagement||(s=d.createElement(Yu,{restoreFocus:!0,contain:i&&!r},s)),s=d.createElement(sp.Provider,{value:a},d.createElement(uh,null,s)),Ht.createPortal(s,n)}function Ko(t){return B0()?t.altKey:t.ctrlKey}const cp=1e3;function dp(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let l=fp(a.key);if(!(!l||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(l===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=l,e.getKeyForSearch!=null){let s=e.getKeyForSearch(i.search,n.focusedKey);s==null&&(s=e.getKeyForSearch(i.search)),s!=null&&(n.setFocusedKey(s),r&&r(s))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},cp)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function fp(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Bc(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:l=!1,selectOnFocus:s=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:h=!1,isVirtualized:p,scrollRef:g=r,linkBehavior:m="action"}=t,{direction:f}=or(),v=fi(),y=E=>{var I;if(E.altKey&&E.key==="Tab"&&E.preventDefault(),!(!((I=r.current)===null||I===void 0)&&I.contains(E.target)))return;const j=(F,X)=>{if(F!=null){if(e.isLink(F)&&m==="selection"&&s&&!Ko(E)){var te;Ht.flushSync(()=>{e.setFocusedKey(F,X)});let de=(te=g.current)===null||te===void 0?void 0:te.querySelector(`[data-key="${CSS.escape(F.toString())}"]`),ce=e.getItemProps(F);de&&v.open(de,E,ce.href,ce.routerOptions);return}if(e.setFocusedKey(F,X),e.isLink(F)&&m==="override")return;E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):s&&!Ko(E)&&e.replaceSelection(F)}};switch(E.key){case"ArrowDown":if(n.getKeyBelow){var W,Z,_;let F=e.focusedKey!=null?(W=n.getKeyBelow)===null||W===void 0?void 0:W.call(n,e.focusedKey):(Z=n.getFirstKey)===null||Z===void 0?void 0:Z.call(n);F==null&&o&&(F=(_=n.getFirstKey)===null||_===void 0?void 0:_.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowUp":if(n.getKeyAbove){var M,G,Y;let F=e.focusedKey!=null?(M=n.getKeyAbove)===null||M===void 0?void 0:M.call(n,e.focusedKey):(G=n.getLastKey)===null||G===void 0?void 0:G.call(n);F==null&&o&&(F=(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F))}break;case"ArrowLeft":if(n.getKeyLeftOf){var L,N,K;let F=e.focusedKey!=null?(L=n.getKeyLeftOf)===null||L===void 0?void 0:L.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(N=n.getFirstKey)===null||N===void 0?void 0:N.call(n,e.focusedKey):(K=n.getLastKey)===null||K===void 0?void 0:K.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var A,z,B;let F=e.focusedKey!=null?(A=n.getKeyRightOf)===null||A===void 0?void 0:A.call(n,e.focusedKey):null;F==null&&o&&(F=f==="rtl"?(z=n.getLastKey)===null||z===void 0?void 0:z.call(n,e.focusedKey):(B=n.getFirstKey)===null||B===void 0?void 0:B.call(n,e.focusedKey)),F!=null&&(E.preventDefault(),j(F,f==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getFirstKey(e.focusedKey,on(E));e.setFocusedKey(F),F!=null&&(on(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):s&&e.replaceSelection(F))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&E.shiftKey)return;E.preventDefault();let F=n.getLastKey(e.focusedKey,on(E));e.setFocusedKey(F),F!=null&&(on(E)&&E.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):s&&e.replaceSelection(F))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let F=n.getKeyPageBelow(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let F=n.getKeyPageAbove(e.focusedKey);F!=null&&(E.preventDefault(),j(F))}break;case"a":on(E)&&e.selectionMode==="multiple"&&l!==!0&&(E.preventDefault(),e.selectAll());break;case"Escape":!a&&e.selectedKeys.size!==0&&(E.stopPropagation(),E.preventDefault(),e.clearSelection());break;case"Tab":if(!h){if(E.shiftKey)r.current.focus();else{let F=qe(r.current,{tabbable:!0}),X,te;do te=F.lastChild(),te&&(X=te);while(te);X&&!X.contains(document.activeElement)&&$t(X)}break}}},C=d.useRef({top:0,left:0});fr(g,"scroll",p?void 0:()=>{var E,I,j,W;C.current={top:(j=(E=g.current)===null||E===void 0?void 0:E.scrollTop)!==null&&j!==void 0?j:0,left:(W=(I=g.current)===null||I===void 0?void 0:I.scrollLeft)!==null&&W!==void 0?W:0}});let S=E=>{if(e.isFocused){E.currentTarget.contains(E.target)||e.setFocused(!1);return}if(E.currentTarget.contains(E.target)){if(e.setFocused(!0),e.focusedKey==null){var I,j;let _=G=>{G!=null&&(e.setFocusedKey(G),s&&e.replaceSelection(G))},M=E.relatedTarget;var W,Z;M&&E.currentTarget.compareDocumentPosition(M)&Node.DOCUMENT_POSITION_FOLLOWING?_((W=e.lastSelectedKey)!==null&&W!==void 0?W:(I=n.getLastKey)===null||I===void 0?void 0:I.call(n)):_((Z=e.firstSelectedKey)!==null&&Z!==void 0?Z:(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n))}else!p&&g.current&&(g.current.scrollTop=C.current.top,g.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&g.current){let _=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);_&&(_.contains(document.activeElement)||$t(_),gl()==="keyboard"&&Ja(_,{containingElement:r.current}))}}},P=E=>{E.currentTarget.contains(E.relatedTarget)||e.setFocused(!1)},x=d.useRef(!1);fr(r,i2,c?E=>{let{detail:I}=E;E.stopPropagation(),e.setFocused(!0),(I==null?void 0:I.focusStrategy)==="first"&&(x.current=!0)}:void 0);let O=Pe(()=>{var E,I;let j=(I=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&I!==void 0?I:null;if(j==null){var W;(W=r.current)===null||W===void 0||W.dispatchEvent(new CustomEvent(Iu,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(x.current=!1)}else e.setFocusedKey(j),x.current=!1});Ya(()=>{x.current&&O()},[e.collection,O]);let D=Pe(()=>{e.collection.size>0&&(x.current=!1)});Ya(()=>{D()},[e.focusedKey,D]),fr(r,r2,c?E=>{E.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=d.useRef(i);d.useEffect(()=>{if(b.current){var E,I;let Z=null;var j;i==="first"&&(Z=(j=(E=n.getFirstKey)===null||E===void 0?void 0:E.call(n))!==null&&j!==void 0?j:null);var W;i==="last"&&(Z=(W=(I=n.getLastKey)===null||I===void 0?void 0:I.call(n))!==null&&W!==void 0?W:null);let _=e.selectedKeys;if(_.size){for(let M of _)if(e.canSelectItem(M)){Z=M;break}}e.setFocused(!0),e.setFocusedKey(Z),Z==null&&!c&&r.current&&qr(r.current)}},[]);let k=d.useRef(e.focusedKey);d.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==k.current||b.current)&&g.current&&r.current){let E=gl(),I=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!I)return;(E==="keyboard"||b.current)&&(_u(g.current,I),E!=="virtual"&&Ja(I,{containingElement:r.current}))}!c&&e.isFocused&&e.focusedKey==null&&k.current!=null&&r.current&&qr(r.current),k.current=e.focusedKey,b.current=!1}),fr(r,"react-aria-focus-scope-restore",E=>{E.preventDefault(),e.setFocused(!0)});let V={onKeyDown:y,onFocus:S,onBlur:P,onMouseDown(E){g.current===E.target&&E.preventDefault()}},{typeSelectProps:R}=dp({keyboardDelegate:n,selectionManager:e});u||(V=ye(R,V));let H;return c?H=-1:H=e.focusedKey==null?0:-1,{collectionProps:{...V,tabIndex:H}}}function Wc(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:l,isDisabled:s,onAction:u,allowsDifferentPressOrigin:c,linkBehavior:h="action"}=t,p=fi();e=tr(e);let g=_=>{if(_.pointerType==="keyboard"&&Ko(_))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(h==="selection"&&i.current){let M=n.getItemProps(r);p.open(i.current,_,M.href,M.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(h==="override"||h==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):_&&_.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||_&&(on(_)||_.pointerType==="touch"||_.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!a)l?l():document.activeElement!==i.current&&i.current&&qr(i.current);else{var M;let G=new CustomEvent(Iu,{cancelable:!0,bubbles:!0});(M=i.current)===null||M===void 0||M.dispatchEvent(G)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),s=s||n.isDisabled(r);let m={};!a&&!s?m={tabIndex:r===n.focusedKey?0:-1,onFocus(_){_.target===i.current&&n.setFocusedKey(r)}}:s&&(m.onMouseDown=_=>{_.preventDefault()});let f=n.isLink(r)&&h==="override",v=n.isLink(r)&&h!=="selection"&&h!=="none",y=!s&&n.canSelectItem(r)&&!f,C=(u||v)&&!s,S=C&&(n.selectionBehavior==="replace"?!y:!y||n.isEmpty),P=C&&y&&n.selectionBehavior==="replace",x=S||P,O=d.useRef(null),D=x&&y,b=d.useRef(!1),k=d.useRef(!1),V=_=>{if(u&&u(),v&&i.current){let M=n.getItemProps(r);p.open(i.current,_,M.href,M.routerOptions)}},R={};o?(R.onPressStart=_=>{O.current=_.pointerType,b.current=D,_.pointerType==="keyboard"&&(!x||kl())&&g(_)},c?(R.onPressUp=S?void 0:_=>{_.pointerType==="mouse"&&y&&g(_)},R.onPress=S?V:_=>{_.pointerType!=="keyboard"&&_.pointerType!=="mouse"&&y&&g(_)}):R.onPress=_=>{if(S||P&&_.pointerType!=="mouse"){if(_.pointerType==="keyboard"&&!Il())return;V(_)}else _.pointerType!=="keyboard"&&y&&g(_)}):(R.onPressStart=_=>{O.current=_.pointerType,b.current=D,k.current=S,y&&(_.pointerType==="mouse"&&!S||_.pointerType==="keyboard"&&(!C||kl()))&&g(_)},R.onPress=_=>{(_.pointerType==="touch"||_.pointerType==="pen"||_.pointerType==="virtual"||_.pointerType==="keyboard"&&x&&Il()||_.pointerType==="mouse"&&k.current)&&(x?V(_):y&&g(_))}),m["data-key"]=r,R.preventFocusOnPress=a;let{pressProps:H,isPressed:E}=ya(R),I=P?_=>{O.current==="mouse"&&(_.stopPropagation(),_.preventDefault(),V(_))}:void 0,{longPressProps:j}=Sh({isDisabled:!D,onLongPress(_){_.pointerType==="touch"&&(g(_),n.setSelectionBehavior("toggle"))}}),W=_=>{O.current==="touch"&&b.current&&_.preventDefault()},Z=n.isLink(r)?_=>{kt.isOpening||_.preventDefault()}:void 0;return{itemProps:ye(m,y||S?H:{},D?j:{},{onDoubleClick:I,onDragStartCapture:W,onClick:Z,id:e}),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:s,allowsSelection:y,hasAction:x}}function Il(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function kl(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Nl{getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?n.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;var n,r;return{width:(n=e==null?void 0:e.scrollWidth)!==null&&n!==void 0?n:0,height:(r=e==null?void 0:e.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let e=this.ref.current;var n,r,i,o;return{x:(n=e==null?void 0:e.scrollLeft)!==null&&n!==void 0?n:0,y:(r=e==null?void 0:e.scrollTop)!==null&&r!==void 0?r:0,width:(i=e==null?void 0:e.offsetWidth)!==null&&i!==void 0?i:0,height:(o=e==null?void 0:e.offsetHeight)!==null&&o!==void 0?o:0}}constructor(e){this.ref=e}}class hp{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,n){let r=e;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(e){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(e){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!Gn(n))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Nl(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Nl(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function pp(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=t,l=Mh({usage:"search",sensitivity:"base"}),s=e.disabledBehavior,u=d.useMemo(()=>o||new hp({collection:n,disabledKeys:r,disabledBehavior:s,ref:i,collator:l,layoutDelegate:a}),[o,a,n,r,i,l,s]),{collectionProps:c}=Bc({...t,ref:i,selectionManager:e,keyboardDelegate:u});return{listProps:c}}function Uc(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function gp(t){return vp(t)}function vp(t,e){for(let n of t)return n}function Vi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Rl(t,e),e],i=[...Rl(t,n),n],o=r.slice(0,i.length).findIndex((a,l)=>a!==i[l]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Rl(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const Ll=new WeakMap;function mp(t){let e=Ll.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Uc(o,t)):n++};return r(t),Ll.set(t,n),n}const Gc=new WeakMap;function yp(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let l=Ve(t,{labelable:!0}),{listProps:s}=pp({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return Gc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ye(l,{onKeyDown:i,onKeyUp:o},{role:"menu",...s,onKeyDown:u=>{var c;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((c=s.onKeyDown)===null||c===void 0||c.call(s,u))}})}}function bp(t,e,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":l,onPressStart:s,onPressUp:u,onPress:c,onPressChange:h,onPressEnd:p,onHoverStart:g,onHoverChange:m,onHoverEnd:f,onKeyDown:v,onKeyUp:y,onFocus:C,onFocusChange:S,onBlur:P,selectionManager:x=e.selectionManager}=t,O=!!l,D=O&&t["aria-expanded"]==="true";var b;let k=(b=t.isDisabled)!==null&&b!==void 0?b:x.isDisabled(i);var V;let R=(V=t.isSelected)!==null&&V!==void 0?V:x.isSelected(i),H=Gc.get(e),E=e.collection.getItem(i),I=t.onClose||H.onClose,j=fi(),W=re=>{var We;if(!O){if(!(E==null||(We=E.props)===null||We===void 0)&&We.onAction?E.props.onAction():t.onAction&&t.onAction(i),H.onAction){let lt=H.onAction;lt(i)}re.target instanceof HTMLAnchorElement&&E&&j.open(re.target,re,E.props.href,E.props.routerOptions)}},Z="menuitem";O||(x.selectionMode==="single"?Z="menuitemradio":x.selectionMode==="multiple"&&(Z="menuitemcheckbox"));let _=Ii(),M=Ii(),G=Ii(),Y={id:r,"aria-disabled":k||void 0,role:Z,"aria-label":t["aria-label"],"aria-labelledby":_,"aria-describedby":[M,G].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":l,"aria-expanded":t["aria-expanded"]};x.selectionMode!=="none"&&!O&&(Y["aria-checked"]=R),a&&(Y["aria-posinset"]=E==null?void 0:E.index,Y["aria-setsize"]=mp(e.collection));let L=re=>{re.pointerType==="keyboard"&&W(re),s==null||s(re)},N=()=>{!O&&I&&(o??(x.selectionMode!=="multiple"||x.isLink(i)))&&I()},K=re=>{re.pointerType==="mouse"&&(W(re),N()),u==null||u(re)},A=re=>{re.pointerType!=="keyboard"&&re.pointerType!=="mouse"&&(W(re),N()),c==null||c(re)},{itemProps:z,isFocused:B}=Wc({id:r,selectionManager:x,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:H.shouldUseVirtualFocus}),{pressProps:F,isPressed:X}=ya({onPressStart:L,onPress:A,onPressUp:K,onPressChange:h,onPressEnd:p,isDisabled:k}),{hoverProps:te}=Ca({isDisabled:k,onHoverStart(re){!gh()&&!(D&&l==="dialog")&&(x.setFocused(!0),x.setFocusedKey(i)),g==null||g(re)},onHoverChange:m,onHoverEnd:f}),{keyboardProps:de}=yh({onKeyDown:re=>{if(re.repeat){re.continuePropagation();return}switch(re.key){case" ":!k&&x.selectionMode==="none"&&!O&&o!==!1&&I&&I();break;case"Enter":!k&&o!==!1&&!O&&I&&I();break;default:O||re.continuePropagation(),v==null||v(re);break}},onKeyUp:y}),{focusProps:ce}=dh({onBlur:P,onFocus:C,onFocusChange:S}),oe=Ve(E==null?void 0:E.props);delete oe.id;let ge=Pu(E==null?void 0:E.props);return{menuItemProps:{...Y,...ye(oe,ge,O?{onFocus:z.onFocus,"data-key":z["data-key"]}:z,F,te,de,ce),tabIndex:z.tabIndex!=null&&D?-1:z.tabIndex},labelProps:{id:_},descriptionProps:{id:M},keyboardShortcutProps:{id:G},isFocused:B,isSelected:R,isPressed:X,isDisabled:k}}function Sp(t){let{heading:e,"aria-label":n}=t,r=tr();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function Cp(t){let e=Ve(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const qc=new WeakMap;function Qr(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${qc.get(t)}-${n}-${e}`):""}function wp(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:a,selectedKey:l}=e,s=r===l,u=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:c,isPressed:h}=Wc({selectionManager:a,key:r,ref:n,isDisabled:u,shouldSelectOnPressUp:o,linkBehavior:"selection"}),p=Qr(e,r,"tab"),g=Qr(e,r,"tabpanel"),{tabIndex:m}=c,f=e.collection.getItem(r),v=Ve(f==null?void 0:f.props,{labelable:!0});delete v.id;let y=Pu(f==null?void 0:f.props);return{tabProps:ye(v,y,c,{id:p,"aria-selected":s,"aria-disabled":u||void 0,"aria-controls":s?g:void 0,tabIndex:u?void 0:m,role:"tab"}),isSelected:s,isDisabled:u,isPressed:h}}function Ep(t,e,n){let r=rh(n)?void 0:0;var i;const o=Qr(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),a=la({...t,id:o,"aria-labelledby":Qr(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:ye(a,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class $p{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function xp(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:a,disabledKeys:l}=e,{direction:s}=or(),u=d.useMemo(()=>new $p(o,s,r,l),[o,l,r,s]),{collectionProps:c}=Bc({ref:n,selectionManager:a,keyboardDelegate:u,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),h=tr();qc.set(e,h);let p=la({...t,id:h});return{tabListProps:{...ye(c,p),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const Tp=d.createContext({});function Pp(t){let[e,n]=nr(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}class Dp{build(e,n){return this.context=n,Ml(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let l=this.getFullNode({element:a,index:o},{});for(let s of l)o++,yield s}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let l=(a=o.key)!==null&&a!==void 0?a:o.id;if(l==null)throw new Error("No key found for item");return l}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(d.isValidElement(e.element)&&e.element.type===d.Fragment){let v=[];d.Children.forEach(e.element.props.children,C=>{v.push(C)});var o;let y=(o=e.index)!==null&&o!==void 0?o:0;for(const C of v)yield*this.getFullNode({element:C,index:y++},n,r,i);return}let a=e.element;if(!a&&e.value&&n&&n.renderer){let v=this.cache.get(e.value);if(v&&(!v.shouldInvalidate||!v.shouldInvalidate(this.context))){v.index=e.index,v.parentKey=i?i.key:null,yield v;return}a=n.renderer(e.value)}if(d.isValidElement(a)){let v=a.type;if(typeof v!="function"&&typeof v.getCollectionNode!="function"){let P=a.type;throw new Error(`Unknown element <${P}> in collection.`)}let y=v.getCollectionNode(a.props,this.context);var l;let C=(l=e.index)!==null&&l!==void 0?l:0,S=y.next();for(;!S.done&&S.value;){let P=S.value;e.index=C;var s;let x=(s=P.key)!==null&&s!==void 0?s:null;x==null&&(x=P.element?null:this.getKey(a,e,n,r));let D=[...this.getFullNode({...P,key:x,index:C,wrapper:Op(e.wrapper,P.wrapper)},this.getChildState(n,P),r?`${r}${a.key}`:a.key,i)];for(let b of D){var u,c;b.value=(c=(u=P.value)!==null&&u!==void 0?u:e.value)!==null&&c!==void 0?c:null,b.value&&this.cache.set(b.value,b);var h;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${Bi(b.type)}> in <${Bi((h=i==null?void 0:i.type)!==null&&h!==void 0?h:"unknown parent type")}>. Only <${Bi(e.type)}> is supported.`);C++,yield b}S=y.next(D)}return}if(e.key==null||e.type==null)return;let p=this;var g,m;let f={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:(g=e.value)!==null&&g!==void 0?g:null,level:i?i.level+1:0,index:e.index,rendered:e.rendered,textValue:(m=e.textValue)!==null&&m!==void 0?m:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Ml(function*(){if(!e.hasChildNodes||!e.childNodes)return;let v=0;for(let y of e.childNodes()){y.key!=null&&(y.key=`${f.key}${y.key}`);let C=p.getFullNode({...y,index:v},p.getChildState(n,y),f.key,f);for(let S of C)v++,yield S}})};yield f}constructor(){this.cache=new WeakMap}}function Ml(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function Op(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Bi(t){return t[0].toUpperCase()+t.slice(1)}function Yc(t,e,n){let r=d.useMemo(()=>new Dp,[]),{children:i,items:o,collection:a}=t;return d.useMemo(()=>{if(a)return a;let s=r.build({children:i,items:o},n);return e(s)},[r,i,o,a,n,e])}function _p(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Ip(t){return kp(t)}function kp(t,e){for(let n of t)return n}function Wi(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Al(t,e),e],i=[...Al(t,n),n],o=r.slice(0,i.length).findIndex((a,l)=>a!==i[l]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function Al(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}function Np(t){let{initialItems:e=[],initialSelectedKeys:n,getKey:r=f=>{var v;return(v=f.id)!==null&&v!==void 0?v:f.key},getChildren:i=f=>f.children}=t,[o,a]=d.useState(()=>h(e,new Map)),{items:l,nodeMap:s}=o,[u,c]=d.useState(new Set(n||[]));function h(f=[],v,y){return f==null&&(f=[]),{items:f.map(C=>{let S={key:r(C),parentKey:y,value:C,children:null};return S.children=h(i(C),v,S.key).items,v.set(S.key,S),S}),nodeMap:v}}function p(f,v,y,C){let S=C.get(v);if(!S)return{items:f,nodeMap:C};let P=new Map(C),x=y(S);for(x==null?m(S,P):g(x,P);S&&S.parentKey;){let D=P.get(S.parentKey),b={key:D.key,parentKey:D.parentKey,value:D.value,children:null},k=D.children;x==null&&k&&(k=k.filter(V=>V!==S));var O;b.children=(O=k==null?void 0:k.map(V=>V===S?x:V))!==null&&O!==void 0?O:null,P.set(b.key,b),x=b,S=D}return x==null&&(f=f.filter(D=>D!==S)),{items:f.map(D=>D===S?x:D),nodeMap:P}}function g(f,v){if(v.set(f.key,f),f.children)for(let y of f.children)g(y,v)}function m(f,v){if(v.delete(f.key),f.children)for(let y of f.children)m(y,v)}return{items:l,selectedKeys:u,setSelectedKeys:c,getItem(f){return s.get(f)},insert(f,v,...y){a(({items:C,nodeMap:S})=>{let{items:P,nodeMap:x}=h(y,S,f);return f==null?{items:[...C.slice(0,v),...P,...C.slice(v)],nodeMap:x}:p(C,f,O=>({key:O.key,parentKey:O.parentKey,value:O.value,children:[...O.children.slice(0,v),...P,...O.children.slice(v)]}),x)})},insertBefore(f,...v){let y=s.get(f);if(!y)return;let C=s.get(y.parentKey),P=(C?C.children:l).indexOf(y);var x;this.insert((x=C==null?void 0:C.key)!==null&&x!==void 0?x:null,P,...v)},insertAfter(f,...v){let y=s.get(f);if(!y)return;let C=s.get(y.parentKey),P=(C?C.children:l).indexOf(y);var x;this.insert((x=C==null?void 0:C.key)!==null&&x!==void 0?x:null,P+1,...v)},prepend(f,...v){this.insert(f,0,...v)},append(f,...v){if(f==null)this.insert(null,l.length,...v);else{let y=s.get(f);if(!y)return;this.insert(f,y.children.length,...v)}},remove(...f){if(f.length===0)return;let v=l,y=s,C;for(let P of f)C=p(v,P,()=>null,y),y=C.nodeMap,v=C.items;a(C);let S=new Set(u);for(let P of u)C.nodeMap.has(P)||S.delete(P);c(S)},removeSelectedItems(){this.remove(...u)},move(f,v,y){a(({items:C,nodeMap:S})=>{let P=S.get(f);if(!P)return{items:C,nodeMap:S};let{items:x,nodeMap:O}=p(C,f,()=>null,S);const D={...P,parentKey:v};return v==null?(O.set(D.key,D),{items:[...x.slice(0,y),D,...x.slice(y)],nodeMap:O}):p(x,v,b=>({key:b.key,parentKey:b.parentKey,value:b.value,children:[...b.children.slice(0,y),D,...b.children.slice(y)]}),O)})},update(f,v){a(({items:y,nodeMap:C})=>p(y,f,S=>{let P={key:S.key,parentKey:S.parentKey,value:v,children:null},x=h(i(v),C,P.key);return P.children=x.items,P},C))}}}class Kl{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let l of a.childNodes)n(l)};for(let a of e)n(a);let r=null,i=0;for(let[a,l]of this.keyMap)r?(r.nextKey=a,l.prevKey=r.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=i++),r=l,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}let tt=class Zc extends Set{constructor(e,n,r){super(e),e instanceof Zc?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Rp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Xc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,l]=d.useState(!1),s=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>Fl(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>Fl(t.defaultSelectedKeys,new tt),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let C=d.useRef(i);return d.useEffect(()=>{i!==C.current&&(y(i),C.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(S){a.current=S,l(S)},get focusedKey(){return s.current},get childFocusStrategy(){return u.current},setFocusedKey(S,P="first"){s.current=S,u.current=P,c(S)},selectedKeys:g,setSelectedKeys(S){(r||!Rp(S,g))&&m(S)},disabledKeys:f,disabledBehavior:o}}function Fl(t,e){return t?t==="all"?"all":new tt(t):e}let Jc=class{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Wi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Wi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new tt([n],n,n);else{let a=this.state.selectedKeys;var i;let l=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new tt(a,l,n);var o;for(let s of this.getKeyRange(l,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(s);for(let s of this.getKeyRange(n,l))this.canSelectItem(s)&&r.add(s)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Wi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new tt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new tt([n],n,n):new tt;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new tt;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=Ip(_p(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new tt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}};function Lp(t){let{filter:e,layoutDelegate:n}=t,r=Xc(t),i=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=d.useCallback(c=>e?new Kl(e(c)):new Kl(c),[e]),a=d.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),l=Yc(t,o,a),s=d.useMemo(()=>new Jc(l,r,{layoutDelegate:n}),[l,r,n]);const u=d.useRef(null);return d.useEffect(()=>{if(r.focusedKey!=null&&!l.getItem(r.focusedKey)&&u.current){const y=u.current.getItem(r.focusedKey),C=[...u.current.getKeys()].map(b=>{const k=u.current.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null),S=[...l.getKeys()].map(b=>{const k=l.getItem(b);return(k==null?void 0:k.type)==="item"?k:null}).filter(b=>b!==null);var c,h;const P=((c=C==null?void 0:C.length)!==null&&c!==void 0?c:0)-((h=S==null?void 0:S.length)!==null&&h!==void 0?h:0);var p,g,m;let x=Math.min(P>1?Math.max(((p=y==null?void 0:y.index)!==null&&p!==void 0?p:0)-P+1,0):(g=y==null?void 0:y.index)!==null&&g!==void 0?g:0,((m=S==null?void 0:S.length)!==null&&m!==void 0?m:0)-1),O=null,D=!1;for(;x>=0;){if(!s.isDisabled(S[x].key)){O=S[x];break}if(x<S.length-1&&!D)x++;else{D=!0;var f,v;x>((f=y==null?void 0:y.index)!==null&&f!==void 0?f:0)&&(x=(v=y==null?void 0:y.index)!==null&&v!==void 0?v:0),x--}}r.setFocusedKey(O?O.key:null)}u.current=l},[l,s,r,r.focusedKey]),{collection:l,disabledKeys:i,selectionManager:s}}function Mp(t){var e;let[n,r]=nr(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=d.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:l}=Lp({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:u=>{if(u==="all")return;var c;let h=(c=u.values().next().value)!==null&&c!==void 0?c:null;h===n&&t.onSelectionChange&&t.onSelectionChange(h),r(h)}}),s=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:l,selectedKey:n,setSelectedKey:r,selectedItem:s}}function Ap(t){var e,n;let r=Mp({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:jl(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:a}=r,l=d.useRef(a);return d.useEffect(()=>{let s=a;(i.isEmpty||s==null||!o.getItem(s))&&(s=jl(o,r.disabledKeys),s!=null&&i.setSelectedKeys([s])),(s!=null&&i.focusedKey==null||!i.isFocused&&s!==l.current)&&i.setFocusedKey(s),l.current=s}),{...r,isDisabled:t.isDisabled||!1}}function jl(t,e){let n=null;if(t){var r,i,o,a;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((a=t.getItem(n))===null||a===void 0||(o=a.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}class Kp{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||n.has(l.key)))for(let s of l.childNodes)r(s)};for(let l of e)r(l);let i=null,o=0;for(let[l,s]of this.keyMap)i?(i.nextKey=l,s.prevKey=i.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=o++),i=s,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function Fp(t){let{onExpandedChange:e}=t,[n,r]=nr(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=Xc(t),o=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Yc(t,d.useCallback(s=>new Kp(s,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:s=>{r(jp(n,s))},setExpandedKeys:r,selectionManager:new Jc(a,i)}}function jp(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Hp=d.createContext(null),zp=d.createContext(null),Qc={CollectionRoot({collection:t,renderDropIndicator:e}){return Hl(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Hl(t,e,n)}};function Hl(t,e,n){return Ru({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,l=t.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(l==null||((i=t.getItem(l))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const gi=d.createContext(Qc);function ed(t){return d.useMemo(()=>t!=null?new Set([t]):null,[t])}const Vp=d.createContext({}),td=d.createContext({}),Bp=fa("separator",function(e,n){[e,n]=ir(e,n,td);let{elementType:r,orientation:i,style:o,className:a}=e,l=r||"hr";l==="hr"&&i==="vertical"&&(l="div");let{separatorProps:s}=Cp({elementType:r,orientation:i});return d.createElement(l,{...Ve(e),...s,style:o,className:a??"react-aria-Separator",ref:n,slot:e.slot||void 0})}),Wp=d.createContext({placement:"bottom"}),Up=d.createContext(null),Gp=d.forwardRef(function(e,n){[e,n]=ir(e,n,Up);let r=d.useContext(lg),i=Pp(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=a2(n,o.isOpen)||e.isExiting||!1;if(f2()){let s=e.children;return typeof s=="function"&&(s=s({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,s)}return o&&!o.isOpen&&!a?null:d.createElement(qp,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a})});function qp({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0);pe(()=>{i.current&&t.isOpen&&a(i.current.getBoundingClientRect().width)},[t.isOpen,i]);var l;let{popoverProps:s,underlayProps:u,arrowProps:c,placement:h}=op({...r,offset:(l=r.offset)!==null&&l!==void 0?l:8,arrowSize:o},t),p=r.popoverRef,g=o2(p,!!h)||r.isEntering||!1,m=yt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:g,isExiting:e}}),f={...s.style,...m.style};return d.createElement(up,{...r,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&d.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),d.createElement("div",{...ye(Ve(r),s),...m,ref:p,slot:r.slot||void 0,style:f,"data-trigger":r.trigger,"data-placement":h,"data-entering":g||void 0,"data-exiting":e||void 0},!r.isNonModal&&d.createElement(_l,{onDismiss:t.close}),d.createElement(Wp.Provider,{value:{...c,placement:h,ref:i}},m.children),d.createElement(_l,{onDismiss:t.close})))}const Yp=d.createContext({});class He extends Set{constructor(e,n,r){super(e),e instanceof He?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function Zp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Xp(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=d.useRef(!1),[,l]=d.useState(!1),s=d.useRef(null),u=d.useRef(null),[,c]=d.useState(null),h=d.useMemo(()=>zl(t.selectedKeys),[t.selectedKeys]),p=d.useMemo(()=>zl(t.defaultSelectedKeys,new He),[t.defaultSelectedKeys]),[g,m]=nr(h,p,t.onSelectionChange),f=d.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,y]=d.useState(i);i==="replace"&&v==="toggle"&&typeof g=="object"&&g.size===0&&y("replace");let C=d.useRef(i);return d.useEffect(()=>{i!==C.current&&(y(i),C.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:y,get isFocused(){return a.current},setFocused(S){a.current=S,l(S)},get focusedKey(){return s.current},get childFocusStrategy(){return u.current},setFocusedKey(S,P="first"){s.current=S,u.current=P,c(S)},selectedKeys:g,setSelectedKeys(S){(r||!Zp(S,g))&&m(S)},disabledKeys:f,disabledBehavior:o}}function zl(t,e){return t?t==="all"?"all":new He(t):e}class Jp{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Vi(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&Vi(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new He([n],n,n);else{let a=this.state.selectedKeys;var i;let l=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new He(a,l,n);var o;for(let s of this.getKeyRange(l,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(s);for(let s of this.getKeyRange(n,l))this.canSelectItem(s)&&r.add(s)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?Vi(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new He(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new He([n],n,n):new He;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new He;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&e.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=gp(Uc(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new He)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}const Qp=d.createContext(null),wa=d.createContext(null),eg=d.createContext(null),ei=d.createContext(null),tg=d.createContext(null),ng=d.forwardRef(function(e,n){return[e,n]=ir(e,n,Qp),d.createElement(Mu,{content:d.createElement(Au,e)},r=>r.size>0&&d.createElement(rg,{props:e,collection:r,menuRef:n}))});function rg({props:t,collection:e,menuRef:n}){let{filterFn:r,collectionProps:i,collectionRef:o}=d.useContext(Hp)||{};n=$n(d.useMemo(()=>Eu(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?e.filter(r):e,[e,r]),l=Fp({...t,collection:a,children:void 0}),s=d.useContext(eg),{isVirtualized:u,CollectionRoot:c}=d.useContext(gi),{menuProps:h}=yp({...t,...i,isVirtualized:u,onClose:t.onClose||(s==null?void 0:s.close)},l,n),p=yt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{}});return d.createElement(Yu,null,d.createElement("div",{...Ve(t),...h,...p,ref:n,slot:t.slot||void 0,onScroll:t.onScroll},d.createElement(rr,{values:[[wa,l],[td,{elementType:"div"}],[zp,{name:"MenuSection",render:og}],[tg,{parentMenuRef:n}],[Fo,null],[ei,l.selectionManager]]},d.createElement(c,{collection:l.collection,persistedKeys:ed(l.selectionManager.focusedKey),scrollRef:n}))))}class ig extends Jp{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function og(t,e,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(wa),{CollectionBranch:l}=d.useContext(gi),[s,u]=l2();var c;let{headingProps:h,groupProps:p}=Sp({heading:u,"aria-label":(c=n.props["aria-label"])!==null&&c!==void 0?c:void 0}),g=yt({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),m=d.useContext(ei),f=Xp(t),v=t.selectionMode!=null?new ig(m,f):m;return d.createElement("section",{...Ve(t),...p,...g,ref:e},d.createElement(rr,{values:[[Vp,{...h,ref:s}],[ei,v]]},d.createElement(l,{collection:a.collection,parent:n})))}const Fo=d.createContext(null),ag=fa("item",function(e,n,r){var i;[e,n]=ir(e,n,Fo);let o=(i=sa(Fo))===null||i===void 0?void 0:i.id,a=d.useContext(wa),l=$n(n),s=d.useContext(ei),{menuItemProps:u,labelProps:c,descriptionProps:h,keyboardShortcutProps:p,...g}=bp({...e,id:o,key:r.key,selectionManager:s},a,l),{isFocusVisible:m,focusProps:f}=hi(),{hoverProps:v,isHovered:y}=Ca({isDisabled:g.isDisabled}),C=yt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...g,isHovered:y,isFocusVisible:m,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),S=e.href?"a":"div";return d.createElement(S,{...ye(u,f,v),...C,ref:l,"data-disabled":g.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":g.isFocused||void 0,"data-focus-visible":m||void 0,"data-pressed":g.isPressed||void 0,"data-selected":g.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},d.createElement(rr,{values:[[Tp,{slots:{label:c,description:h}}],[Yp,p]]},C.children))}),lg=d.createContext(null),vi=d.createContext(null),bn=d.createContext(null),sg=d.forwardRef(function(e,n){[e,n]=ir(e,n,vi);let{children:r,orientation:i="horizontal"}=e;return r=d.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),d.createElement(Mu,{content:r},o=>d.createElement(ug,{props:e,collection:o,tabsRef:n}))});function ug({props:t,tabsRef:e,collection:n}){let{orientation:r="horizontal"}=t,i=Ap({...t,collection:n,children:void 0}),{focusProps:o,isFocused:a,isFocusVisible:l}=hi({within:!0}),s=d.useMemo(()=>({orientation:r,isFocusWithin:a,isFocusVisible:l}),[r,a,l]),u=yt({...t,defaultClassName:"react-aria-Tabs",values:s});return d.createElement("div",{...Ve(t),...o,...u,ref:e,slot:t.slot||void 0,"data-focused":a||void 0,"data-orientation":r,"data-focus-visible":l||void 0,"data-disabled":i.isDisabled||void 0},d.createElement(rr,{values:[[vi,t],[bn,i]]},u.children))}const cg=d.forwardRef(function(e,n){return d.useContext(bn)?d.createElement(dg,{props:e,forwardedRef:n}):d.createElement(Au,e)});function dg({props:t,forwardedRef:e}){let n=d.useContext(bn),{CollectionRoot:r}=d.useContext(gi),{orientation:i="horizontal",keyboardActivation:o="automatic"}=sa(vi),a=$n(e),{tabListProps:l}=xp({...t,orientation:i,keyboardActivation:o},n,a),s=yt({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:n}}),u=Ve(t);return delete u.id,d.createElement("div",{...u,...l,ref:a,...s,"data-orientation":i||void 0},d.createElement(r,{collection:n.collection,persistedKeys:ed(n.selectionManager.focusedKey)}))}const fg=fa("item",(t,e,n)=>{let r=d.useContext(bn),i=$n(e),{tabProps:o,isSelected:a,isDisabled:l,isPressed:s}=wp({key:n.key,...t},r,i),{focusProps:u,isFocused:c,isFocusVisible:h}=hi(),{hoverProps:p,isHovered:g}=Ca({isDisabled:l,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),m=yt({...t,id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:a,isDisabled:l,isFocused:c,isFocusVisible:h,isPressed:s,isHovered:g}}),f=n.props.href?"a":"div";return d.createElement(f,{...ye(o,u,p,m),ref:i,"data-selected":a||void 0,"data-disabled":l||void 0,"data-focused":c||void 0,"data-focus-visible":h||void 0,"data-pressed":s||void 0,"data-hovered":g||void 0})}),hg=d2(function(e,n){const r=d.useContext(bn);let i=$n(n),{tabPanelProps:o}=Ep(e,r,i),{focusProps:a,isFocused:l,isFocusVisible:s}=hi(),u=r.selectedKey===e.id,c=yt({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:l,isFocusVisible:s,isInert:!u,state:r}});if(!u&&!e.shouldForceMount)return null;let h=Ve(e);delete h.id;let p=u?ye(h,o,a,c):c;return d.createElement("div",{...p,ref:i,"data-focused":l||void 0,"data-focus-visible":s||void 0,inert:u?void 0:"true","data-inert":u?void 0:"true"},d.createElement(rr,{values:[[vi,null],[bn,null]]},d.createElement(gi.Provider,{value:Qc},c.children)))}),nd=({options:t,isOpen:e=!1,onOpenChange:n,children:r,selectedValues:i=[],onSelectValue:o})=>{const a=d.useId(),l=u=>{n==null||n(u)},s=d.useRef(null);return w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"c__dropdown-menu-trigger",ref:s,id:a,onClick:u=>{u.stopPropagation(),u.preventDefault()},children:r}),w.jsx(Gp,{triggerRef:s,style:{marginTop:"0px"},isOpen:e,onOpenChange:l,children:w.jsx(ng,{className:"c__dropdown-menu","aria-labelledby":a,children:t.map(u=>w.jsxs(d.Fragment,{children:[w.jsxs(ag,{className:"c__dropdown-menu-item","aria-label":u.label,onAction:()=>{var c;u.value&&(o==null||o(u.value)),(c=u.callback)==null||c.call(u),l(!1)},isDisabled:u.isDisabled,children:[u.icon,w.jsx("div",{className:"c__dropdown-menu-item__label","aria-label":u.label,children:u.label}),(u.isChecked||u.value&&i.includes(u.value))&&w.jsx("span",{className:"material-icons checked",children:"check"})]},u.label),u.showSeparator&&w.jsx(Bp,{})]},u.label))})})]})},rd=()=>{const[t,e]=d.useState(!1);return{isOpen:t,setIsOpen:e}},Vl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M10%206v2H5v11h11v-5h2v6a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V7a1%201%200%200%201%201-1h6Zm11-3v8h-2V6.413l-7.793%207.794-1.414-1.414L17.585%205H13V3h8Z'%20/%3e%3c/svg%3e",pg="data:image/svg+xml,%3csvg%20width='109'%20height='60'%20viewBox='0%200%20109%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3crect%20width='33'%20height='12'%20fill='url(%23paint0_linear_5795_13250)'%20/%3e%3cg%20clip-path='url(%23clip0_5795_13250)'%3e%3cg%20clip-path='url(%23clip1_5795_13250)'%3e%3cpath%20d='M8.475%206.8999C7.8%207.3499%207.2%207.8749%206.75%208.4749V8.3999C7.05%208.0249%207.275%207.6499%207.5%207.2749C7.8%207.1249%208.025%206.8999%208.25%206.6749C8.625%206.2999%209%205.9249%209.525%205.6999C9.75%205.6249%209.9%205.6249%2010.125%205.6999C10.05%205.7749%209.975%205.7749%209.825%205.8499H9.75V5.7749C9.525%205.9999%209.225%206.1499%209%206.4499C8.925%206.5999%208.85%206.8999%208.475%206.8999C8.55%206.8999%208.475%206.9749%208.475%206.8999ZM9.675%2010.3499C9.675%2010.2749%209.6%2010.3499%209.525%2010.3499L9.45%2010.4249L9.375%2010.4999L9.225%2010.6499C9.225%2010.6499%209.3%2010.7249%209.375%2010.6499L9.45%2010.5749C9.525%2010.5749%209.6%2010.4999%209.6%2010.4249C9.675%2010.4249%209.675%2010.4249%209.675%2010.3499ZM8.475%207.1249C8.55%207.1249%208.625%207.1249%208.625%207.0499C8.625%206.9749%208.7%206.9749%208.7%206.9749V6.8999C8.55%206.9749%208.475%207.0499%208.475%207.1249ZM10.275%208.5499C10.35%208.4749%2010.425%208.4749%2010.5%208.4749C11.025%208.3999%2011.55%208.2499%2012.075%208.0249C11.475%207.6499%2010.8%207.3499%2010.125%207.2749H10.2C10.125%207.1999%209.975%207.1999%209.825%207.1249H9.9C9.75%207.0499%209.525%207.0499%209.375%206.9749C9.45%206.9749%209.525%206.8249%209.525%206.7499H9.45C9.15%206.8999%209%207.1249%208.85%207.4249C9%207.4999%209.225%207.4249%209.375%207.4999H9.15C9.075%207.4999%209%207.5749%209%207.6499H9.075C9%207.6499%209%207.7249%208.925%207.7249C9%207.7999%209.075%207.7249%209.225%207.7249C9.225%207.7999%209.3%207.7999%209.3%207.7999C9.225%207.7999%209.15%207.8749%209.075%208.0249C9%208.1749%208.925%208.1749%208.85%208.2499V8.3249C8.625%208.4749%208.4%208.6999%208.175%208.9249V8.9999C8.1%209.0749%208.025%209.0749%208.025%209.1499V9.2249C8.325%209.1499%208.475%208.9249%208.775%208.8499L9.225%208.6249C9.375%208.6249%209.45%208.5499%209.6%208.5499V8.6249H9.75C9.75%208.6999%209.6%208.6249%209.675%208.6999C9.75%208.7749%209.9%208.7749%209.975%208.6999C10.125%208.5499%2010.2%208.5499%2010.275%208.5499ZM9.3%209.7499C9%209.8999%208.625%209.8999%208.4%2010.0499C8.4%2010.0499%208.4%2010.1249%208.325%2010.1249C8.325%2010.1249%208.25%2010.1249%208.25%2010.1999C8.175%2010.1999%208.175%2010.2749%208.1%2010.3499L8.025%2010.4249C8.025%2010.4249%208.025%2010.4999%208.1%2010.4249L8.175%2010.3499C8.175%2010.3499%208.1%2010.4249%208.1%2010.4999V10.7249L8.025%2010.7999C8.025%2010.7999%208.025%2010.8749%207.95%2010.8749L7.875%2010.9499L8.025%2010.7999L8.1%2010.7249H8.25C8.25%2010.7249%208.25%2010.6499%208.325%2010.6499C8.4%2010.5749%208.475%2010.4999%208.55%2010.4999H8.625C8.7%2010.4249%208.85%2010.4249%208.925%2010.3499C9%2010.2749%209.075%2010.1999%209.15%2010.1999C9.3%2010.0499%209.525%209.9749%209.75%209.8249C9.675%209.8249%209.6%209.7499%209.525%209.7499C9.525%209.8249%209.375%209.7499%209.3%209.7499ZM22.5%206.5249C22.425%206.6749%2022.2%206.6749%2022.05%206.7499C21.9%206.8999%2022.05%207.0499%2022.125%207.1249C22.2%207.3499%2021.975%207.4999%2021.825%207.4999C21.9%207.5749%2021.975%207.5749%2021.975%207.5749C21.975%207.7249%2022.125%207.7249%2022.05%207.8749C21.975%208.0249%2021.675%208.0999%2021.825%208.2499C21.9%208.3999%2021.9%208.6249%2021.825%208.7749C21.75%208.9249%2021.6%209.0749%2021.45%209.1499C21.3%209.2249%2021.15%209.2249%2021%209.1499C20.925%209.1499%2020.925%209.0749%2020.85%209.0749C20.475%208.9999%2020.1%208.9249%2019.725%208.9249C19.65%208.9249%2019.5%208.9999%2019.425%208.9999C19.35%209.0749%2019.2%209.1499%2019.125%209.2249L19.05%209.2999C18.975%209.3749%2018.9%209.4499%2018.9%209.5249C18.825%209.6749%2018.75%209.8249%2018.75%209.9749C18.6%2010.3499%2018.6%2010.7249%2018.75%2011.0249C18.75%2011.0249%2019.5%2011.2499%2020.025%2011.4749C20.175%2011.5499%2020.4%2011.6249%2020.55%2011.7749L21.825%2012.5249H9.9L11.1%2011.7749C11.55%2011.4749%2012.075%2011.2499%2012.6%2011.0249C12.975%2010.8749%2013.425%2010.6499%2013.725%2010.3499C13.875%2010.1999%2013.95%2010.0499%2014.1%209.9749C14.325%209.6749%2014.55%209.4499%2014.85%209.2249L15.075%208.9999C15.075%208.9999%2015.075%208.9249%2015.15%208.9249C15%208.9999%2015%209.0749%2014.85%209.0749C14.85%209.0749%2014.775%209.0749%2014.85%208.9999C14.925%208.9249%2015%208.8499%2015.075%208.8499V8.7749C14.775%208.7749%2014.55%208.9249%2014.325%209.1499H14.175C13.8%209.2999%2013.575%209.5249%2013.275%209.6749V9.5999C13.125%209.6749%2012.975%209.7499%2012.9%209.7499C12.75%209.7499%2012.525%209.8249%2012.3%209.7499C12%209.7499%2011.775%209.8249%2011.475%209.8999C11.325%209.9749%2011.175%209.9749%2011.025%2010.0499V10.1249L10.875%2010.2749C10.725%2010.3499%2010.65%2010.4249%2010.5%2010.5749L10.125%2010.9499H10.05L10.125%2010.8749L10.2%2010.7999C10.2%2010.7249%2010.275%2010.7249%2010.275%2010.6499C10.425%2010.5749%2010.5%2010.4249%2010.65%2010.3499C10.65%2010.3499%2010.65%2010.2749%2010.725%2010.2749L10.65%2010.3499C10.575%2010.4249%2010.575%2010.4999%2010.5%2010.4999V10.4249V10.3499L10.65%2010.1999C10.725%2010.1249%2010.8%2010.1249%2010.875%2010.0499H10.95C10.8%2010.1249%2010.725%2010.1249%2010.575%2010.1999H10.5H10.425C10.425%2010.1249%2010.5%2010.1249%2010.575%2010.0499H10.65C11.4%209.4499%2012.375%209.5999%2013.2%209.2999C13.275%209.2249%2013.35%209.2249%2013.425%209.1499C13.5%209.0749%2013.65%208.9999%2013.8%208.9249C13.95%208.7749%2014.1%208.6249%2014.175%208.3999V8.3249C13.875%208.6249%2013.575%208.8499%2013.2%209.0749C12.75%209.2249%2012.225%209.3749%2011.7%209.3749C11.7%209.2999%2011.775%209.2999%2011.775%209.2999C11.775%209.2249%2011.85%209.2249%2011.85%209.1499H11.925C11.925%209.1499%2011.925%209.0749%2012%209.0749H12.075C12%208.9999%2011.85%209.1499%2011.775%209.0749C11.85%208.9999%2011.775%208.9249%2011.85%208.9249H11.925C11.925%208.9249%2011.925%208.8499%2012%208.8499C12.375%208.6249%2012.675%208.4749%2012.975%208.3249C12.9%208.3249%2012.9%208.3999%2012.825%208.3249C12.9%208.3249%2012.825%208.2499%2012.9%208.2499C13.125%208.1749%2013.35%208.0249%2013.575%207.9499C13.5%207.9499%2013.425%208.0249%2013.35%207.9499C13.425%207.9499%2013.425%207.8749%2013.5%207.8749V7.7999C13.5%207.7249%2013.575%207.7999%2013.65%207.7249H13.575C13.65%207.6499%2013.725%207.5749%2013.875%207.5749C13.875%207.4999%2013.8%207.5749%2013.8%207.4999H13.875H13.5C13.425%207.4999%2013.5%207.4249%2013.5%207.4249C13.575%207.2749%2013.65%207.0499%2013.725%206.8999H13.65C13.425%207.1249%2013.05%207.2749%2012.75%207.3499H12.6C12.45%207.4249%2012.3%207.4249%2012.225%207.3499C12.15%207.2749%2012.075%207.1999%2012%207.1999C11.85%207.1249%2011.625%206.9749%2011.4%206.8999C10.875%206.7499%2010.275%206.5999%209.675%206.6749C9.9%206.5999%2010.2%206.5249%2010.5%206.4499C10.875%206.2999%2011.25%206.2249%2011.625%206.2249H11.4C11.1%206.2249%2010.725%206.2999%2010.425%206.3749C10.2%206.4499%209.975%206.5249%209.75%206.5249C9.6%206.5999%209.525%206.6749%209.375%206.6749V6.5999C9.6%206.2999%209.9%206.0749%2010.2%205.9999C10.575%205.9249%2011.025%205.9999%2011.4%206.0749C11.7%206.0749%2012%206.1499%2012.225%206.2249C12.3%206.2249%2012.375%206.3749%2012.45%206.4499C12.6%206.5249%2012.75%206.4499%2012.825%206.5249V6.3749C12.9%206.2999%2013.05%206.3749%2013.125%206.3749C13.275%206.2249%2012.975%206.0749%2012.9%205.9249V5.8499C13.05%205.9999%2013.275%206.1499%2013.425%206.2999C13.5%206.3749%2013.8%206.4499%2013.8%206.2999C13.65%206.0749%2013.5%205.8499%2013.275%205.6249V5.4749C13.2%205.4749%2013.2%205.4749%2013.2%205.3999C13.125%205.3249%2013.125%205.2499%2013.125%205.1749C13.05%205.0249%2013.125%204.8749%2013.05%204.7999C12.975%204.6499%2012.975%204.5749%2012.975%204.4249C12.9%204.0499%2012.825%203.6749%2012.75%203.3749C12.675%202.9249%2012.975%202.6249%2013.2%202.2499C13.35%201.9499%2013.575%201.7249%2013.8%201.4999C13.875%201.1999%2014.025%200.974902%2014.25%200.749902C14.475%200.524902%2014.7%200.374902%2014.925%200.299902C15.15%200.224902%2015.3%200.149902%2015.525%200.0749024L17.4%20-0.225098H18.75L20.1%20-9.76473e-05C20.175%20-9.76473e-05%2020.25%20-9.76324e-05%2020.25%200.0749024C20.325%200.149902%2020.475%200.224902%2020.55%200.224902C20.7%200.299902%2020.85%200.449902%2021%200.599902C21.075%200.674902%2021.15%200.824902%2021.075%200.899902C21%200.974902%2021%201.1999%2020.925%201.1999C20.775%201.2749%2020.625%201.2749%2020.475%201.2749C20.4%201.2749%2020.325%201.2749%2020.175%201.1999C20.55%201.3499%2020.85%201.4999%2021.075%201.7999C21.075%201.8749%2021.225%201.8749%2021.3%201.8749V1.9499C21.225%202.0249%2021.225%202.0249%2021.225%202.0999H21.3C21.375%202.0249%2021.375%201.7999%2021.525%201.8749C21.675%201.9499%2021.675%202.0999%2021.6%202.1749C21.525%202.2499%2021.45%202.3249%2021.3%202.3999V2.5499C21.375%202.6249%2021.375%202.6999%2021.45%202.8499C21.525%202.9999%2021.525%203.2249%2021.6%203.3749C21.675%203.7499%2021.75%204.0499%2021.75%204.4249C21.75%204.5749%2021.675%204.7999%2021.75%204.9499L21.975%205.3999C22.05%205.5499%2022.125%205.6249%2022.2%205.7749C22.35%205.9999%2022.65%206.2249%2022.5%206.5249ZM10.8%2010.4249C10.725%2010.4249%2010.725%2010.4999%2010.725%2010.4999C10.725%2010.4999%2010.8%2010.4999%2010.8%2010.4249ZM10.125%208.9249C10.125%208.9999%2010.2%208.9249%2010.2%208.9249C10.35%208.8499%2010.575%208.9249%2010.65%208.7749C10.575%208.6999%2010.5%208.7749%2010.5%208.6999C10.425%208.6999%2010.35%208.6999%2010.35%208.7749C10.275%208.8499%2010.125%208.8499%2010.125%208.9249Z'%20fill='white'%20/%3e%3cpath%20d='M20.925%204.3501C21%204.3501%2021.15%204.3501%2021.15%204.4251C21.075%204.5751%2020.85%204.6501%2020.7%204.8001H20.625C20.55%204.8751%2020.55%204.9501%2020.55%204.9501H20.325C20.4%205.0251%2020.55%205.1001%2020.7%205.1001L20.775%205.1751H20.925V5.2501C20.85%205.3251%2020.775%205.3251%2020.625%205.3251C20.775%205.4001%2021%205.4001%2021.15%205.3251C21.3%205.2501%2021.15%205.0251%2021.225%204.9501C21.15%204.9501%2021.225%204.8751%2021.15%204.8751C21.225%204.8001%2021.225%204.7251%2021.3%204.7251C21.375%204.7251%2021.375%204.7251%2021.45%204.6501C21.45%204.5751%2021.375%204.5751%2021.375%204.5001C21.525%204.4251%2021.6%204.2751%2021.6%204.1251C21.6%204.0501%2021.375%204.0501%2021.3%203.9751H20.925C20.775%203.9751%2020.7%204.0501%2020.55%204.0501L20.1%204.2751C20.25%204.2001%2020.4%204.2001%2020.625%204.1251C20.625%204.3501%2020.775%204.3501%2020.925%204.3501Z'%20fill='%237C7C7C'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M5.355%2025.5762C6.1866%2025.5762%206.9048%2025.2864%207.4088%2024.8076V23.2704H5.166V21.7458H9.198V25.4502C8.379%2026.5464%207.0056%2027.252%205.355%2027.252C2.4948%2027.252%200.5418%2025.11%200.5418%2022.59C0.5418%2020.07%202.4444%2017.928%205.229%2017.928C6.8292%2017.928%208.1396%2018.6462%208.946%2019.7172L7.5348%2020.8134C7.0308%2020.0952%206.237%2019.6038%205.229%2019.6038C3.5658%2019.6038%202.3814%2020.9016%202.3814%2022.59C2.3814%2024.2784%203.6288%2025.5762%205.355%2025.5762ZM15.2175%2017.928C17.9895%2017.928%2019.8921%2020.07%2019.8921%2022.59C19.8921%2025.11%2017.9895%2027.252%2015.2175%2027.252C12.4329%2027.252%2010.5303%2025.11%2010.5303%2022.59C10.5303%2020.07%2012.4329%2017.928%2015.2175%2017.928ZM15.2175%2025.5762C16.8681%2025.5762%2018.0525%2024.2784%2018.0525%2022.59C18.0525%2020.9016%2016.8681%2019.6038%2015.2175%2019.6038C13.5543%2019.6038%2012.3699%2020.9016%2012.3699%2022.59C12.3699%2024.2784%2013.5543%2025.5762%2015.2175%2025.5762ZM26.8084%2023.6988V18.18H28.5976V23.5476C28.5976%2025.866%2027.2368%2027.252%2025.0192%2027.252C22.8142%2027.252%2021.4534%2025.866%2021.4534%2023.5476V18.18H23.2426V23.6988C23.2426%2024.8832%2023.9104%2025.5762%2025.0318%2025.5762C26.128%2025.5762%2026.8084%2024.8832%2026.8084%2023.6988ZM29.7114%2018.18H31.614L34.2222%2025.0722L36.8304%2018.18H38.733L35.394%2027H33.0504L29.7114%2018.18ZM40.095%2027V18.18H45.2358V19.6668H41.8842V21.7584H44.7318V23.2452H41.8842V25.5132H45.2358V27H40.095ZM47.3149%2027V18.18H50.0113C51.9517%2018.18%2053.1487%2019.1754%2053.1487%2020.8134C53.1487%2021.8844%2052.6321%2022.6782%2051.7249%2023.094L54.4843%2027H52.3801L50.0239%2023.4342H49.1041V27H47.3149ZM50.1121%2019.6668H49.1041V21.9474H50.1121C50.8681%2021.9474%2051.3091%2021.5064%2051.3091%2020.7882C51.3091%2020.1204%2050.8681%2019.6668%2050.1121%2019.6668ZM55.6176%2027V18.18H57.9108L61.8546%2024.5556V18.18H63.6438V27H61.3506L57.4068%2020.6244V27H55.6176ZM66.1105%2027V18.18H71.2513V19.6668H67.8997V21.7584H70.7473V23.2452H67.8997V25.5132H71.2513V27H66.1105ZM73.3304%2027V18.18H75.5606L77.7152%2021.8844L79.8698%2018.18H82.1V27H80.3108V20.6748L78.3452%2023.976H77.0852L75.1196%2020.6748V27H73.3304ZM84.5617%2027V18.18H89.7025V19.6668H86.3509V21.7584H89.1985V23.2452H86.3509V25.5132H89.7025V27H84.5617ZM91.7816%2027V18.18H94.0748L98.0186%2024.5556V18.18H99.8078V27H97.5146L93.5708%2020.6244V27H91.7816ZM101.367%2019.8054V18.18H108.6V19.8054H105.878V27H104.089V19.8054H101.367Z'%20fill='%23161616'%20/%3e%3cg%20clip-path='url(%23clip2_5795_13250)'%3e%3cg%20clip-path='url(%23clip3_5795_13250)'%3e%3cg%20clip-path='url(%23clip4_5795_13250)'%3e%3cg%20clip-path='url(%23clip5_5795_13250)'%3e%3cg%20clip-path='url(%23clip6_5795_13250)'%3e%3cpath%20d='M30.775%2056.45C31.15%2055.5%2030.7%2055.125%2030.15%2055.125C29.225%2055.125%2028.175%2056.75%2028.175%2058.05C28.175%2058.675%2028.475%2059%2028.925%2059C29.45%2059%2030%2058.5%2030.475%2057.625H30.225C29.925%2058%2029.575%2058.275%2029.25%2058.275C28.925%2058.275%2028.75%2058.075%2028.75%2057.625C28.7558%2057.4396%2028.781%2057.2552%2028.825%2057.075L30.775%2056.45ZM29.775%2055.675C30.05%2055.675%2030.275%2055.875%2030.15%2056.325L28.95%2056.65C29.15%2056.1%2029.5%2055.65%2029.8%2055.65L29.775%2055.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M30.15%2054.6999L31.275%2053.6749V53.5249H30.525L29.85%2054.6999H30.175H30.15Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip7_5795_13250)'%3e%3cpath%20d='M25.975%2055.675H26.625L25.575%2058.525C25.5421%2058.576%2025.5242%2058.6352%2025.5232%2058.6959C25.5222%2058.7565%2025.5382%2058.8163%2025.5694%2058.8683C25.6007%2058.9204%2025.6458%2058.9626%2025.6998%2058.9903C25.7538%2059.018%2025.8145%2059.03%2025.875%2059.025C26.625%2059.025%2027.475%2058.375%2027.825%2057.475H27.65C27.3359%2057.9021%2026.8865%2058.2105%2026.375%2058.35L27.3%2055.675H28.3L28.425%2055.275H27.475L27.8%2054.25H27.45L26.775%2055.275L25.975%2055.375V55.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip8_5795_13250)'%3e%3cpath%20d='M25.3%2055.5249C25.375%2055.2749%2025.2%2055.1249%2025.05%2055.1249C24.5%2055.1249%2023.8%2055.6499%2023.55%2056.3749H23.725C23.9026%2056.0881%2024.1778%2055.875%2024.5%2055.7749L23.425%2058.5999C23.4034%2058.6422%2023.3932%2058.6894%2023.3952%2058.7368C23.3973%2058.7843%2023.4116%2058.8304%2023.4368%2058.8707C23.4619%2058.911%2023.4971%2058.9441%2023.5389%2058.9667C23.5806%2058.9893%2023.6275%2059.0008%2023.675%2058.9999C24.225%2058.9999%2024.85%2058.4999%2025.125%2057.7499H24.9C24.7378%2058.0509%2024.471%2058.2821%2024.15%2058.3999L25.3%2055.5249ZM25.4%2054.4499C25.4591%2054.4499%2025.5176%2054.4383%2025.5722%2054.4156C25.6268%2054.393%2025.6764%2054.3599%2025.7182%2054.3181C25.76%2054.2763%2025.7932%2054.2267%2025.8158%2054.1721C25.8384%2054.1175%2025.85%2054.059%2025.85%2053.9999C25.8534%2053.9387%2025.8443%2053.8775%2025.8232%2053.82C25.8021%2053.7625%2025.7695%2053.7099%2025.7274%2053.6654C25.6853%2053.6209%2025.6345%2053.5855%2025.5782%2053.5614C25.5219%2053.5372%2025.4613%2053.5248%2025.4%2053.5249C25.2807%2053.5249%2025.1662%2053.5723%2025.0818%2053.6567C24.9974%2053.7411%2024.95%2053.8556%2024.95%2053.9749C24.95%2054.0943%2024.9974%2054.2087%2025.0818%2054.2931C25.1662%2054.3775%2025.2807%2054.4249%2025.4%2054.4249'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip9_5795_13250)'%3e%3cpath%20d='M20.125%2055.8999C20.3%2055.8999%2020.375%2056.1499%2020.125%2056.7499L19.375%2058.4499C19.2%2058.7749%2019.375%2058.9999%2019.675%2058.9999C19.7577%2059.0148%2019.843%2058.997%2019.9129%2058.9504C19.9828%2058.9038%2020.0319%2058.8319%2020.05%2058.7499L20.8%2056.7499C21.15%2056.3249%2021.8%2055.8749%2022.05%2055.8749C22.3%2055.8749%2022.25%2056.0249%2022.125%2056.2749L20.975%2058.5249C20.9497%2058.5734%2020.9371%2058.6276%2020.9383%2058.6823C20.9395%2058.737%2020.9545%2058.7906%2020.9819%2058.838C21.0094%2058.8854%2021.0483%2058.925%2021.0952%2058.9533C21.142%2058.9816%2021.1953%2058.9976%2021.25%2058.9999C21.825%2058.9999%2022.5%2058.4999%2022.75%2057.7499H22.6C22.4209%2058.051%2022.1355%2058.274%2021.8%2058.3749L22.8%2056.3749C22.9222%2056.1611%2022.9908%2055.9209%2023%2055.6749C23.0079%2055.6007%2022.9991%2055.5257%2022.9742%2055.4554C22.9494%2055.3851%2022.9091%2055.3212%2022.8564%2055.2685C22.8036%2055.2158%2022.7398%2055.1755%2022.6695%2055.1507C22.5991%2055.1258%2022.5242%2055.117%2022.45%2055.1249C21.95%2055.1249%2021.55%2055.6749%2020.95%2056.3749V55.8249C20.95%2055.4749%2020.825%2055.1249%2020.5%2055.1249C20.1%2055.1249%2019.75%2055.7499%2019.475%2056.3499H19.65C19.825%2056.0749%2019.975%2055.8999%2020.15%2055.8999'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip10_5795_13250)'%3e%3cpath%20d='M19.375%2056C19.5%2055.525%2019.425%2055.125%2019.075%2055.125C18.625%2055.125%2018.5%2055.425%2018.075%2056.375V55.825C18.05%2055.45%2017.925%2055.125%2017.575%2055.125C17.2%2055.125%2016.85%2055.75%2016.55%2056.375H16.75C16.925%2056.05%2017.125%2055.875%2017.25%2055.875C17.425%2055.875%2017.5%2056.125%2017.25%2056.725L16.5%2058.425C16.325%2058.75%2016.5%2058.95%2016.8%2058.95C16.8827%2058.9649%2016.968%2058.9472%2017.0379%2058.9006C17.1078%2058.8539%2017.1569%2058.7821%2017.175%2058.7L17.925%2056.7C18.1317%2056.4415%2018.3486%2056.1913%2018.575%2055.95H19.375V56Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip11_5795_13250)'%3e%3cpath%20d='M16.175%2056.45C16.55%2055.5%2016.1%2055.125%2015.55%2055.125C14.625%2055.125%2013.575%2056.75%2013.575%2058.05C13.575%2058.675%2013.875%2059%2014.325%2059C14.85%2059%2015.4%2058.5%2015.875%2057.625H15.625C15.325%2058%2014.975%2058.275%2014.65%2058.275C14.325%2058.275%2014.15%2058.075%2014.15%2057.625C14.1559%2057.4396%2014.181%2057.2552%2014.225%2057.075L16.175%2056.45ZM15.175%2055.675C15.45%2055.675%2015.675%2055.875%2015.55%2056.325L14.35%2056.65C14.55%2056.1%2014.9%2055.65%2015.2%2055.65L15.175%2055.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip12_5795_13250)'%3e%3cpath%20d='M11.35%2055.675H12L10.95%2058.525C10.9171%2058.576%2010.8992%2058.6352%2010.8982%2058.6959C10.8972%2058.7565%2010.9132%2058.8163%2010.9444%2058.8683C10.9757%2058.9204%2011.0208%2058.9626%2011.0748%2058.9903C11.1288%2059.018%2011.1895%2059.03%2011.25%2059.025C12%2059.025%2012.85%2058.375%2013.2%2057.475H13.025C12.7109%2057.9021%2012.2615%2058.2105%2011.75%2058.35L12.675%2055.675H13.675L13.8%2055.275H12.85L13.175%2054.25H12.825L12.15%2055.275L11.35%2055.375V55.675Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip13_5795_13250)'%3e%3cpath%20d='M9.84996%2058.2252C9.69996%2058.2252%209.59996%2057.9752%209.84996%2057.3752L10.875%2054.9752L10.575%2054.9502L10.25%2055.2752H10.175C8.74996%2055.2752%207.22496%2057.1002%207.22496%2058.5002C7.22137%2058.5701%207.23249%2058.64%207.25761%2058.7053C7.28272%2058.7706%207.32126%2058.8299%207.37075%2058.8794C7.42024%2058.9289%207.47956%2058.9674%207.54488%2058.9926C7.6102%2059.0177%207.68007%2059.0288%207.74996%2059.0252C8.17496%2059.0252%208.57496%2058.4252%209.04996%2057.7752L9.02496%2058.0252C8.94996%2058.6752%209.17496%2059.0252%209.52496%2059.0252C9.89996%2059.0252%2010.275%2058.4252%2010.525%2057.8002H10.35C10.175%2058.0752%209.97496%2058.2502%209.84996%2058.2502V58.2252ZM9.19996%2057.4002C8.87496%2057.8002%208.34996%2058.2752%208.12496%2058.2752C7.99996%2058.2752%207.89996%2058.1502%207.89996%2057.8752C7.89996%2057.0002%208.89996%2055.8252%209.39996%2055.8252C9.51862%2055.822%209.63696%2055.8389%209.74996%2055.8752L9.19996%2057.4002Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip14_5795_13250)'%3e%3cpath%20d='M7.85004%2056C7.97504%2055.525%207.90004%2055.125%207.55004%2055.125C7.10004%2055.125%206.97504%2055.425%206.55004%2056.375V55.825C6.52504%2055.45%206.40004%2055.125%206.05004%2055.125C5.67504%2055.125%205.32504%2055.75%205.02504%2056.375H5.22504C5.40004%2056.05%205.60004%2055.875%205.72504%2055.875C5.90004%2055.875%205.97504%2056.125%205.72504%2056.725L4.97504%2058.425C4.80004%2058.75%204.97504%2058.95%205.27504%2058.95C5.35775%2058.9649%205.443%2058.9472%205.51292%2058.9006C5.58284%2058.8539%205.63198%2058.7821%205.65004%2058.7L6.40004%2056.7C6.60676%2056.4415%206.82359%2056.1913%207.05004%2055.95H7.85004V56Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip15_5795_13250)'%3e%3cpath%20d='M2.79998%2058.8499L2.87498%2058.6249C1.92498%2058.4499%201.79998%2058.4499%202.19998%2057.4249L2.54998%2056.4499H3.29998C3.77498%2056.4499%203.77498%2056.6749%203.69998%2057.1999H3.94998L4.59998%2055.4749H4.34998C4.09998%2055.8749%203.89998%2056.1999%203.39998%2056.1999H2.64998L3.14998%2054.7999C3.34998%2054.2999%203.42498%2054.1999%204.07498%2054.1999H4.24998C4.89998%2054.1999%204.99998%2054.3749%204.99998%2055.0749H5.24998L5.47498%2053.8999H1.82498L1.74998%2054.1249C2.49998%2054.2749%202.57498%2054.3499%202.24998%2055.3249L1.42498%2057.3999C1.04998%2058.3749%200.924976%2058.4499%200.0499756%2058.5999L-0.0250244%2058.8249L2.79998%2058.8499Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip16_5795_13250)'%3e%3cg%20clip-path='url(%23clip17_5795_13250)'%3e%3cpath%20d='M21.925%2048.2C22.3%2047.25%2021.85%2046.875%2021.3%2046.875C20.375%2046.875%2019.325%2048.5%2019.325%2049.8C19.325%2050.425%2019.625%2050.75%2020.075%2050.75C20.6%2050.75%2021.15%2050.25%2021.625%2049.375H21.375C21.075%2049.75%2020.725%2050.025%2020.4%2050.025C20.075%2050.025%2019.9%2049.825%2019.9%2049.375C19.9059%2049.1896%2019.931%2049.0052%2019.975%2048.825L21.925%2048.2ZM20.925%2047.425C21.2%2047.425%2021.425%2047.625%2021.3%2048.075L20.1%2048.4C20.3%2047.85%2020.65%2047.4%2020.95%2047.4L20.925%2047.425Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M21.3%2046.4499L22.425%2045.4249V45.2749H21.675L21%2046.4499H21.325H21.3Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip18_5795_13250)'%3e%3cpath%20d='M17.125%2047.425H17.775L16.725%2050.275C16.6921%2050.326%2016.6742%2050.3852%2016.6732%2050.4459C16.6722%2050.5065%2016.6882%2050.5663%2016.7195%2050.6183C16.7507%2050.6704%2016.7959%2050.7126%2016.8499%2050.7403C16.9039%2050.768%2016.9645%2050.78%2017.025%2050.775C17.775%2050.775%2018.625%2050.125%2018.975%2049.225H18.8C18.4859%2049.6521%2018.0365%2049.9605%2017.525%2050.1L18.45%2047.425H19.45L19.575%2047.025H18.625L18.95%2046H18.6L17.925%2047.025L17.125%2047.125V47.425Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip19_5795_13250)'%3e%3cpath%20d='M16.45%2047.25C16.525%2047%2016.35%2046.85%2016.2%2046.85C15.65%2046.85%2014.95%2047.375%2014.7%2048.1H14.875C15.0526%2047.8132%2015.3278%2047.6001%2015.65%2047.5L14.575%2050.325C14.5534%2050.3673%2014.5431%2050.4145%2014.5452%2050.4619C14.5472%2050.5094%2014.5615%2050.5555%2014.5867%2050.5958C14.6119%2050.6361%2014.6471%2050.6692%2014.6888%2050.6918C14.7306%2050.7144%2014.7775%2050.7259%2014.825%2050.725C15.375%2050.725%2016%2050.225%2016.275%2049.475H16.05C15.8878%2049.776%2015.621%2050.0072%2015.3%2050.125L16.45%2047.25ZM16.55%2046.175C16.6091%2046.175%2016.6676%2046.1634%2016.7222%2046.1407C16.7768%2046.1181%2016.8264%2046.085%2016.8682%2046.0432C16.91%2046.0014%2016.9431%2045.9518%2016.9657%2045.8972C16.9884%2045.8426%2017%2045.7841%2017%2045.725C17.0034%2045.6638%2016.9943%2045.6026%2016.9732%2045.5451C16.9521%2045.4876%2016.9195%2045.435%2016.8774%2045.3905C16.8352%2045.346%2016.7845%2045.3106%2016.7282%2045.2865C16.6719%2045.2623%2016.6113%2045.2499%2016.55%2045.25C16.4306%2045.25%2016.3162%2045.2974%2016.2318%2045.3818C16.1474%2045.4662%2016.1%2045.5807%2016.1%2045.7C16.1%2045.8193%2016.1474%2045.9338%2016.2318%2046.0182C16.3162%2046.1026%2016.4306%2046.15%2016.55%2046.15'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip20_5795_13250)'%3e%3cpath%20d='M13.075%2050.1249L14.875%2045.3499L14.8%2045.2749L13.55%2045.4249V45.5749L13.8%2045.7499C14.025%2045.9249%2013.95%2046.0749%2013.75%2046.5999L12.4%2050.2499C12.3685%2050.2991%2012.3509%2050.3559%2012.349%2050.4142C12.3471%2050.4726%2012.3609%2050.5304%2012.389%2050.5815C12.4172%2050.6327%2012.4586%2050.6753%2012.5089%2050.705C12.5592%2050.7346%2012.6166%2050.7501%2012.675%2050.7499C13.25%2050.7499%2013.85%2050.2249%2014.125%2049.4999H13.95C13.7377%2049.8015%2013.4291%2050.0219%2013.075%2050.1249Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip21_5795_13250)'%3e%3cpath%20d='M11.35%2049.9752C11.2%2049.9752%2011.1%2049.7252%2011.35%2049.1252L12.375%2046.7252L12.075%2046.7002L11.75%2047.0252H11.675C10.25%2047.0252%208.72496%2048.8502%208.72496%2050.2502C8.72137%2050.3201%208.73249%2050.39%208.75761%2050.4553C8.78272%2050.5206%208.82126%2050.5799%208.87075%2050.6294C8.92024%2050.6789%208.97956%2050.7174%209.04488%2050.7426C9.1102%2050.7677%209.18007%2050.7788%209.24996%2050.7752C9.67496%2050.7752%2010.075%2050.1752%2010.55%2049.5252L10.525%2049.7752C10.45%2050.4252%2010.675%2050.7752%2011.025%2050.7752C11.4%2050.7752%2011.775%2050.1752%2012.025%2049.5502H11.85C11.675%2049.8252%2011.475%2050.0002%2011.35%2050.0002V49.9752ZM10.7%2049.1502C10.375%2049.5502%209.84996%2050.0252%209.62496%2050.0252C9.49996%2050.0252%209.39996%2049.9002%209.39996%2049.6252C9.39996%2048.7502%2010.4%2047.5752%2010.9%2047.5752C11.0186%2047.572%2011.137%2047.5889%2011.25%2047.6252L10.7%2049.1502Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip22_5795_13250)'%3e%3cpath%20d='M9.15%2047.0002H8.075C7.91845%2046.8999%207.73591%2046.8477%207.55%2046.8502C7.11669%2046.8501%206.70075%2047.0205%206.39202%2047.3246C6.0833%2047.6286%205.90657%2048.0419%205.9%2048.4752C5.88969%2048.5836%205.90095%2048.693%205.93314%2048.797C5.96532%2048.9011%206.01779%2048.9977%206.08751%2049.0814C6.15724%2049.1651%206.24284%2049.2341%206.33938%2049.2845C6.43592%2049.335%206.54149%2049.3658%206.65%2049.3752C6.175%2049.5752%205.9%2049.8252%205.9%2050.1002C5.9%2050.1772%205.92093%2050.2528%205.96057%2050.3188C6.0002%2050.3849%206.05703%2050.4389%206.125%2050.4752C5.05%2050.8002%204.625%2051.1752%204.625%2051.6502C4.625%2052.1502%205.275%2052.3502%206.025%2052.3502C7.35%2052.3502%208.425%2051.6752%208.425%2051.0752C8.425%2050.6252%208.025%2050.4502%207.35%2050.2502C6.8%2050.0752%206.55%2050.0502%206.55%2049.8502C6.56644%2049.752%206.60704%2049.6595%206.66814%2049.581C6.72924%2049.5024%206.80892%2049.4403%206.9%2049.4002C7.31131%2049.369%207.69601%2049.1848%207.97828%2048.884C8.26056%2048.5832%208.41993%2048.1876%208.425%2047.7752C8.42962%2047.6483%208.41272%2047.5215%208.375%2047.4002H9L9.15%2047.0002ZM7.1%2050.9002C7.625%2051.0752%207.85%2051.1502%207.85%2051.3002C7.85%2051.6502%207.35%2051.9252%206.45%2051.9252C5.775%2051.9252%205.45%2051.7752%205.45%2051.4252C5.45%2051.0502%205.8%2050.8002%206.325%2050.6002C6.56712%2050.7189%206.81783%2050.8191%207.075%2050.9002H7.1ZM6.9%2049.1002C6.65%2049.1002%206.575%2048.9002%206.575%2048.6752C6.575%2047.9752%206.925%2047.1252%207.45%2047.1252C7.7%2047.1252%207.775%2047.3252%207.775%2047.5252C7.775%2048.2502%207.425%2049.1002%206.9%2049.1002Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip23_5795_13250)'%3e%3cpath%20d='M3.575%2048.2252C4.05%2048.2252%204.075%2048.4252%203.975%2048.9252H4.25L4.875%2047.2252H4.625C4.375%2047.6252%204.2%2047.9502%203.675%2047.9502H2.65L3.15%2046.5502C3.325%2046.0502%203.4%2045.9502%204.075%2045.9502H4.5C5.15%2045.9502%205.25%2046.1252%205.25%2046.8252H5.5L5.725%2045.6502H1.825L1.75%2045.8752C2.5%2046.0252%202.575%2046.1002%202.25%2047.0752L1.45%2049.1752C1.075%2050.1502%200.95%2050.2252%200.05%2050.3752L0%2050.6252H4.35L5.15%2049.3752H4.85C4.35%2049.8752%203.85%2050.3252%202.85%2050.3252C1.675%2050.3252%201.775%2050.2502%202.175%2049.1752L2.525%2048.2252H3.575ZM4.15%2045.2752L5.25%2044.4752V44.3252H4.5L3.85%2045.3002H4.15V45.2752Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip24_5795_13250)'%3e%3cg%20clip-path='url(%23clip25_5795_13250)'%3e%3cpath%20d='M21.8%2039.95C22.175%2039%2021.725%2038.625%2021.175%2038.625C20.25%2038.625%2019.2%2040.25%2019.2%2041.55C19.2%2042.175%2019.5%2042.5%2019.95%2042.5C20.475%2042.5%2021.025%2042%2021.5%2041.125H21.25C20.95%2041.5%2020.6%2041.775%2020.275%2041.775C19.95%2041.775%2019.775%2041.575%2019.775%2041.125C19.7809%2040.9396%2019.806%2040.7552%2019.85%2040.575L21.8%2039.95ZM20.8%2039.175C21.075%2039.175%2021.3%2039.375%2021.175%2039.825L19.975%2040.15C20.175%2039.6%2020.525%2039.15%2020.825%2039.15L20.8%2039.175Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cpath%20d='M21.175%2038.1999L22.3%2037.1749V37.0249H21.55L20.875%2038.1999H21.2H21.175Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip26_5795_13250)'%3e%3cpath%20d='M16.975%2039.1501H17.625L16.575%2042.0001C16.5421%2042.0511%2016.5242%2042.1103%2016.5232%2042.171C16.5222%2042.2316%2016.5382%2042.2914%2016.5694%2042.3434C16.6007%2042.3955%2016.6458%2042.4377%2016.6998%2042.4654C16.7538%2042.4931%2016.8145%2042.5051%2016.875%2042.5001C17.625%2042.5001%2018.475%2041.8501%2018.825%2040.9501H18.65C18.3359%2041.3772%2017.8865%2041.6856%2017.375%2041.8251L18.3%2039.1501H19.3L19.425%2038.7501H18.475L18.8%2037.7251H18.45L17.775%2038.7501L16.975%2038.8501V39.1501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip27_5795_13250)'%3e%3cpath%20d='M16.65%2039.5C16.775%2039.025%2016.7%2038.625%2016.35%2038.625C15.9%2038.625%2015.775%2038.925%2015.35%2039.875V39.325C15.325%2038.95%2015.2%2038.625%2014.85%2038.625C14.475%2038.625%2014.125%2039.25%2013.825%2039.875H14.025C14.2%2039.55%2014.4%2039.375%2014.525%2039.375C14.7%2039.375%2014.775%2039.625%2014.525%2040.225L13.775%2041.925C13.6%2042.25%2013.775%2042.45%2014.075%2042.45C14.1577%2042.4649%2014.243%2042.4472%2014.3129%2042.4006C14.3828%2042.3539%2014.432%2042.2821%2014.45%2042.2L15.2%2040.2C15.4067%2039.9415%2015.6236%2039.6913%2015.85%2039.45H16.65V39.5Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip28_5795_13250)'%3e%3cpath%20d='M13.45%2039.9251C13.825%2038.9751%2013.375%2038.6001%2012.825%2038.6001C11.9%2038.6001%2010.85%2040.2251%2010.85%2041.5251C10.85%2042.1501%2011.15%2042.4751%2011.6%2042.4751C12.125%2042.4751%2012.675%2041.9751%2013.15%2041.1001H12.9C12.6%2041.4751%2012.25%2041.7501%2011.925%2041.7501C11.6%2041.7501%2011.425%2041.5501%2011.425%2041.1001C11.4308%2040.9147%2011.456%2040.7303%2011.5%2040.5501L13.45%2039.9251ZM12.45%2039.1501C12.725%2039.1501%2012.95%2039.3501%2012.825%2039.8001L11.625%2040.1251C11.825%2039.5751%2012.175%2039.1251%2012.475%2039.1251L12.45%2039.1501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip29_5795_13250)'%3e%3cpath%20d='M10.2%2038.6249C9.69998%2038.6249%209.19998%2039.1749%208.74998%2039.8249L9.74998%2037.0999L9.69998%2037.0249L8.44998%2037.1749V37.2749L8.69998%2037.4749C8.92498%2037.6499%208.84998%2037.7999%208.64998%2038.3249L7.54998%2041.2249C7.46796%2041.4023%207.40106%2041.5863%207.34998%2041.7749C7.34998%2042.1249%207.79998%2042.4499%208.22498%2042.4499C9.17498%2042.4499%2010.725%2040.7249%2010.725%2039.3999C10.725%2038.8249%2010.6%2038.5999%2010.2%2038.5999V38.6249ZM8.54998%2041.8999C8.34998%2041.8999%208.07498%2041.7249%208.07498%2041.5749C8.12768%2041.3868%208.19454%2041.2029%208.27498%2041.0249L8.59998%2040.1999C8.92498%2039.7749%209.44998%2039.3499%209.74998%2039.3499C9.92498%2039.3499%2010.05%2039.4499%2010.05%2039.7249C10.05%2040.4999%209.32498%2041.8999%208.54998%2041.8999Z'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip30_5795_13250)'%3e%3cpath%20d='M7.05003%2039C7.12503%2038.75%206.95003%2038.6%206.80003%2038.6C6.25003%2038.6%205.55003%2039.125%205.30003%2039.85H5.47503C5.65263%2039.5632%205.92784%2039.3501%206.25003%2039.25L5.17503%2042.075C5.15343%2042.1173%205.14316%2042.1645%205.14522%2042.2119C5.14727%2042.2594%205.16158%2042.3055%205.18676%2042.3458C5.21193%2042.3861%205.24711%2042.4192%205.28887%2042.4418C5.33063%2042.4644%205.37754%2042.4759%205.42503%2042.475C5.97503%2042.475%206.60003%2041.975%206.87503%2041.225H6.65003C6.4878%2041.526%206.22102%2041.7572%205.90003%2041.875L7.05003%2039ZM7.15003%2037.925C7.20913%2037.925%207.26764%2037.9134%207.32224%2037.8907C7.37684%2037.8681%207.42645%2037.835%207.46823%2037.7932C7.51002%2037.7514%207.54316%2037.7018%207.56578%2037.6472C7.58839%2037.5926%207.60003%2037.5341%207.60003%2037.475C7.60344%2037.4138%207.59432%2037.3526%207.57323%2037.2951C7.55214%2037.2376%207.51954%2037.185%207.47741%2037.1405C7.43528%2037.096%207.38451%2037.0606%207.32822%2037.0365C7.27193%2037.0123%207.21129%2036.9999%207.15003%2037C7.03069%2037%206.91623%2037.0474%206.83184%2037.1318C6.74744%2037.2162%206.70003%2037.3307%206.70003%2037.45C6.70003%2037.5693%206.74744%2037.6838%206.83184%2037.7682C6.91623%2037.8526%207.03069%2037.9%207.15003%2037.9'%20fill='%23161616'%20/%3e%3c/g%3e%3cg%20clip-path='url(%23clip31_5795_13250)'%3e%3cpath%20d='M4.4%2037.3501H1.825L1.75%2037.5751C2.5%2037.7251%202.575%2037.8001%202.25%2038.7751L1.45%2040.9001C1.075%2041.8751%200.95%2041.9501%200.075%2042.1001L0%2042.3501H3.925L4.8%2040.8501H4.5C4%2041.3501%203.45%2042.0501%202.575%2042.0501C1.9%2042.0501%201.825%2041.9251%202.175%2040.9251L2.95%2038.8001C3.3%2037.8251%203.45%2037.7501%204.325%2037.6001L4.4%2037.3501Z'%20fill='%23161616'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_5795_13250'%20x1='0'%20y1='6'%20x2='33'%20y2='6'%20gradientUnits='userSpaceOnUse'%20%3e%3cstop%20stop-color='%23000091'%20/%3e%3cstop%20offset='0.5'%20stop-color='%23000091'%20/%3e%3cstop%20offset='0.5'%20stop-color='%23E1000F'%20/%3e%3cstop%20offset='1'%20stop-color='%23E1000F'%20/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_5795_13250'%3e%3crect%20width='33'%20height='12'%20fill='white'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_5795_13250'%3e%3crect%20width='33'%20height='13.5'%20fill='white'%20transform='translate(0%20-0.75)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_5795_13250'%3e%3crect%20width='108.88'%20height='26.5'%20fill='white'%20transform='translate(0%2033)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_5795_13250'%3e%3crect%20width='63'%20height='45'%20fill='white'%20transform='translate(0%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip4_5795_13250'%3e%3crect%20width='31.5'%20height='22.5'%20fill='white'%20transform='translate(0%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip5_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(28.175%2053.5249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip6_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(28.175%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip7_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(25.55%2054.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip8_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(23.4%2053.5249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip9_5795_13250'%3e%3crect%20width='3.7'%20height='3.875'%20fill='white'%20transform='translate(19.3%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip10_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(16.425%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip11_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(13.575%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip12_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(10.925%2054.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip13_5795_13250'%3e%3crect%20width='3.675'%20height='4.05'%20fill='white'%20transform='translate(7.22498%2054.9502)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip14_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(4.90002%2055.125)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip15_5795_13250'%3e%3crect%20width='5.475'%20height='4.95'%20fill='white'%20transform='translate(0%2053.8999)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip16_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(19.325%2045.2749)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip17_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(19.325%2046.875)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip18_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(16.7%2046)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip19_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(14.55%2045.25)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip20_5795_13250'%3e%3crect%20width='2.525'%20height='5.475'%20fill='white'%20transform='translate(12.35%2045.2749)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip21_5795_13250'%3e%3crect%20width='3.675'%20height='4.05'%20fill='white'%20transform='translate(8.72498%2046.7002)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip22_5795_13250'%3e%3crect%20width='4.5'%20height='5.5'%20fill='white'%20transform='translate(4.65002%2046.8501)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip23_5795_13250'%3e%3crect%20width='5.75'%20height='6.275'%20fill='white'%20transform='translate(0%2044.3252)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip24_5795_13250'%3e%3crect%20width='3.1'%20height='5.45'%20fill='white'%20transform='translate(19.2%2037.0249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip25_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(19.2%2038.625)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip26_5795_13250'%3e%3crect%20width='2.875'%20height='4.75'%20fill='white'%20transform='translate(16.55%2037.7251)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip27_5795_13250'%3e%3crect%20width='3'%20height='3.875'%20fill='white'%20transform='translate(13.7%2038.625)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip28_5795_13250'%3e%3crect%20width='2.75'%20height='3.875'%20fill='white'%20transform='translate(10.85%2038.6001)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip29_5795_13250'%3e%3crect%20width='3.4'%20height='5.45'%20fill='white'%20transform='translate(7.34998%2037.0249)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip30_5795_13250'%3e%3crect%20width='2.45'%20height='5.475'%20fill='white'%20transform='translate(5.15002%2037)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clip31_5795_13250'%3e%3crect%20width='4.8'%20height='4.975'%20fill='white'%20transform='translate(0%2037.3501)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gg=()=>{const{t}=_t.useCunningham();return w.jsxs("footer",{className:"c__footer",children:[w.jsx("div",{className:"c__footer__stripe"}),w.jsxs("div",{className:"c__footer__content",children:[w.jsxs("div",{className:"c__footer__content__top",children:[w.jsx("div",{children:w.jsx("div",{className:"c__footer__content__top__logo",children:w.jsx("img",{className:"c__footer__logo",alt:"",width:"0",height:"0",decoding:"async","data-nimg":"1",src:pg})})}),w.jsx("div",{className:"c__footer__content__top__links",children:[{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr/"},{label:"info.gouv.fr",href:"https://info.gouv.fr/"},{label:"service-public.fr",href:"https://service-public.fr/"},{label:"data.gouv.fr",href:"https://data.gouv.fr/"}].map(({label:e,href:n})=>w.jsxs("a",{href:n,target:"_blank",children:[w.jsx("span",{children:e}),w.jsx("img",{alt:"",width:"18",decoding:"async","data-nimg":"1",src:Vl})]},e))})]}),w.jsx("div",{className:"c__footer__content__middle",children:[{label:t("components.footer.links.legal"),href:"/legal-notice"},{label:t("components.footer.links.personal_data"),href:"/personal-data-cookies"},{label:t("components.footer.links.accessibility"),href:"/accessibility"}].map(({label:e,href:n})=>w.jsx("a",{href:n,children:w.jsx("span",{children:e})},e))}),w.jsxs("p",{className:"c__footer__content__mention",children:[t("components.footer.mention")," ",w.jsxs("a",{href:"https://github.com/etalab/licence-ouverte/blob/master/LO.md",target:"__blank",children:[w.jsx("span",{children:t("components.footer.license")}),w.jsx("img",{alt:"",width:"18",decoding:"async","data-nimg":"1",src:Vl})]})]})]})]})},vg=({logo:t,mainButton:e,banner:n,title:r,subtitle:i})=>w.jsx("div",{className:"c__hero",children:w.jsxs("div",{className:"c__hero__display",children:[w.jsxs("div",{className:"c__hero__display__captions",children:[t,w.jsx("h2",{children:r}),w.jsx("span",{children:i}),e||w.jsx(Su,{})]}),w.jsx("img",{src:n,alt:""})]})}),mg=({children:t})=>w.jsx("div",{className:"c__home-gutter",children:t}),id=(t,e,n=void 0)=>{const r=Array.isArray(e)?e:e.replace(/(\[(\d)\])/g,".$2").replace(/^\./,"").split(".");if(!r.length||r[0]===void 0)return t;const i=r[0];return typeof t!="object"||t===null||!(i in t)||t[i]===void 0?n:id(t[i],r.slice(1),n)},yg={placeholder:"Entrez votre adresse e-mail",srLabel:"Adresse e-mail",submit:"Suivant",title:"Connexion avec {linebreak}votre adresse e-mail"},bg={homepageLinkTitle:{withoutService:"Retour à l'accueil",withService:"Retour à l'accueil - {serviceName}"},license:"Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous {license}",licenseEtalab:"licence etalab-2.0",links:{a11y:{perfect:"Accessibilité : conforme",partial:"Accessibilité : partiellement conforme",bad:"Accessibilité : non conforme"},privacy:"Données personnelles",sitemap:"Plan du site",terms:"Mentions légales"}},Sg={label:"Les services de La Suite numérique"},Cg={homepageLinkTitle:"Accueil - {serviceName}"},wg={newWindow:"{title} - nouvelle fenêtre"},Eg={help:"Qu'est-ce que ProConnect ?",loginWith:"S’identifier avec",loginWithProconnect:"{loginWith} {proconnect}",or:"ou",title:"Connexion avec ProConnect"},od={email:yg,footer:bg,gaufre:Sg,header:Cg,links:wg,proconnect:Eg},$g=d.createContext(od);function xg(){const t=d.useContext($g)||od;return{t:function(e,n={}){const r=id(t,e);if(!r)return console.warn(`Translation for key "${e}" not found`),e;if(n){const i=[];if(Object.keys(n).forEach(a=>{typeof n[a]!="string"&&i.push(a)}),!i.length)return r.replace(/{(\w+)}/g,(a,l)=>n[l]);const o=r.split(/{(.*?)}/);return w.jsx(w.Fragment,{children:o.map((a,l)=>a in n?w.jsx(d.Fragment,{children:n[a]},l):a)})}return r}}}const Tg={responsive:"lasuite-gaufre-btn--responsive",small:"lasuite-gaufre-btn--small"},Pg=({variant:t})=>{const{t:e}=xg(),n=t?Tg[t]:"";return w.jsx("button",{type:"button",className:`lasuite-gaufre-btn ${n} lasuite-gaufre-btn--vanilla js-lasuite-gaufre-btn`,title:e("gaufre.label"),children:e("gaufre.label")})},Dg=()=>w.jsxs(w.Fragment,{children:[w.jsx("script",{src:"https://integration.lasuite.numerique.gouv.fr/api/v1/gaufre.js",id:"lasuite-gaufre-script",async:!0,defer:!0}),w.jsx(Pg,{variant:"small"})]}),ad=({languages:t})=>{const{isOpen:e,setIsOpen:n}=rd();return w.jsx(nd,{options:t,isOpen:e,onOpenChange:n,children:w.jsxs(_t.Button,{onClick:()=>n(!e),color:"primary-text",className:"c__language-picker",children:[w.jsx("span",{className:"material-icons",children:"translate"}),w.jsx("span",{className:"c__language-picker__label",children:"Français"}),w.jsx("span",{className:"material-icons",children:e?"arrow_drop_up":"arrow_drop_down"})]})})},ld=({leftIcon:t,rightIcon:e,languages:n,onTogglePanel:r,isPanelOpen:i})=>{const{t:o}=_t.useCunningham();return w.jsxs("div",{className:"c__header",children:[w.jsx("div",{className:"c__header__toggle-menu",children:w.jsx(_t.Button,{size:"medium",onClick:r,"aria-label":o(i?"Close the menu":"Open the menu"),color:"tertiary-text",icon:w.jsx("span",{className:"material-icons clr-primary-800",children:i?"close":"menu"})})}),w.jsx("div",{className:"c__header__left",children:t}),w.jsxs("div",{className:"c__header__right",children:[n&&w.jsx("div",{className:"c__header__right__language-picker",children:w.jsx(ad,{languages:n})}),e]})]})},jo={themes:{default:{theme:{colors:{"primary-text":"#000091","primary-050":"#F5F5FE","primary-100":"#ECECFE","primary-150":"#F4F4FD","primary-200":"#E3E3FD","primary-300":"#CACAFB","primary-400":"#8585F6","primary-500":"#6A6AF4","primary-600":"#313178","primary-700":"#272747","primary-800":"#000091","primary-900":"#21213F","secondary-text":"#fff","secondary-100":"#fee9ea","secondary-200":"#fedfdf","secondary-300":"#fdbfbf","secondary-400":"#e1020f","secondary-500":"#c91a1f","secondary-600":"#5e2b2b","secondary-700":"#3b2424","secondary-800":"#341f1f","secondary-900":"#2b1919","greyscale-text":"#303C4B","greyscale-000":"#fff","greyscale-050":"#F6F6F6","greyscale-100":"#eee","greyscale-200":"#E5E5E5","greyscale-250":"#ddd","greyscale-300":"#CECECE","greyscale-350":"#ddd","greyscale-400":"#929292","greyscale-500":"#7C7C7C","greyscale-600":"#666666","greyscale-700":"#3A3A3A","greyscale-750":"#353535","greyscale-800":"#2A2A2A","greyscale-900":"#242424","greyscale-950":"#1E1E1E","greyscale-1000":"#161616","success-text":"#1f8d49","success-100":"#dffee6","success-200":"#b8fec9","success-300":"#88fdaa","success-400":"#3bea7e","success-500":"#1f8d49","success-600":"#18753c","success-700":"#204129","success-800":"#1e2e22","success-900":"#19281d","info-text":"#0078f3","info-100":"#E8EDFF","info-200":"#DDE5FF","info-300":"#BCCDFF","info-400":"#518FFF","info-500":"#0078F3","info-600":"#0063CB","info-700":"#273961","info-800":"#222A3F","info-900":"#1D2437","warning-text":"#d64d00","warning-100":"#fff4f3","warning-200":"#ffe9e6","warning-300":"#ffded9","warning-400":"#ffbeb4","warning-500":"#d64d00","warning-600":"#b34000","warning-700":"#5e2c21","warning-800":"#3e241e","warning-900":"#361e19","danger-text":"#FFF","danger-050":"#FFF4F4","danger-100":"#FFE9E9","danger-200":"#FFDDDD","danger-300":"#FFBDBD","danger-400":"#FF5655","danger-500":"#F60700","danger-600":"#CE0500","danger-700":"#642626","danger-800":"#412121","danger-900":"#391C1C"},font:{sizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",ml:"0.938rem",xl:"1.25rem",t:"0.6875rem",s:"0.75rem",h1:"2rem",h2:"1.75rem",h3:"1.5rem",h4:"1.375rem",h5:"1.25rem",h6:"1.125rem","xl-alt":"5rem","lg-alt":"4.5rem","md-alt":"4rem","sm-alt":"3.5rem","xs-alt":"3rem"},weights:{thin:100,extrabold:800,black:900},families:{accent:"Marianne",base:"Marianne"}},spacings:{0:"0",none:"0",auto:"auto",bx:"2.2rem",full:"100%","4xs":"0.125rem","3xs":"0.25rem","2xs":"0.375rem",xs:"0.5rem",sm:"0.75rem",base:"1rem",md:"1.5rem",lg:"2rem",xl:"2.5rem",xxl:"3rem",xxxl:"3.5rem","4xl":"4rem","5xl":"4.5rem","6xl":"6rem","7xl":"7.5rem"},breakpoints:{xxs:"320px",xs:"480px",mobile:"768px",tablet:"1024px"}},components:{modal:{"width-small":"342px"},tooltip:{padding:"4px 8px","background-color":"var(--c--theme--colors--greyscale-1000)"},button:{"medium-height":"40px","medium-text-height":"40px","border-radius":"4px","small-height":"26px",primary:{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"#1212ff","background--color-active":"#2323ff","background--color-disabled":"var(--c--theme--colors--greyscale-100)",color:"#fff","color-hover":"#fff","color-active":"#fff","color-focus-visible":"#fff",disabled:"var(--c--theme--colors--greyscale-500)"},"primary-text":{"background--color":"var(--c--theme--colors--primary-text)","background--color-hover":"var(--c--theme--colors--greyscale-100)","background--color-active":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"#fff","background--color-disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","color-hover":"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--greyscale-400)"},secondary:{"background--color-hover":"#F6F6F6","background--color-active":"#EDEDED","background--color-focus-visible":"var(--c--theme--colors--greyscale-000)","background--disabled":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-800)","border--color":"var(--c--theme--colors--greyscale-300)","border--color-hover":"var(--c--theme--colors--greyscale-300)","border--color-disabled":"var(--c--theme--colors--greyscale-300)",disabled:"var(--c--theme--colors--greyscale-400)"},tertiary:{"background--color":"var(--c--theme--colors--primary-100)","background--color-focus-visible":"var(--c--theme--colors--primary-100)","background--color-hover":"var(--c--theme--colors--primary-300)","background--color-active":"var(--c--theme--colors--primary-300)","background--disabled":"var(--c--theme--colors--primary-050)",color:"var(--c--theme--colors--primary-800)",disabled:"var(--c--theme--colors--primary-300)"},"tertiary-text":{"background--color-hover":"var(--c--theme--colors--greyscale-100)","color-hover":"var(--c--theme--colors--primary-text)",color:"var(--c--theme--colors--primary-600)"},danger:{"color-hover":"white","background--color":"var(--c--theme--colors--danger-600)","background--color-hover":"#FF2725","background--color-focus-visible":"var(--c--theme--colors--danger-600)","background--color-disabled":"var(--c--theme--colors--greyscale-100)","color-disabled":"var(--c--theme--colors--greyscale-400)"}},datagrid:{"header--color":"ref(theme.colors.greyscale-600)","header--size":"12px","header--weight":"500","body--background-color-hover":"ref(theme.colors.greyscale-100)"},"forms-checkbox":{"border-radius":"4px","border-color":"var(--c--theme--colors--primary-800)","background-color--hover":"var(--c--theme--colors--greyscale-100)","border--color-disabled":"var(--c--theme--colors--greyscale-200)","border--color":"var(--c--theme--colors--primary-800)","background--disabled":"var(--c--theme--colors--greyscale-200)","background--enable":"var(--c--theme--colors--primary-800)","check--disabled":"var(--c--theme--colors--greyscale-300)","check--enable":"var(--c--theme--colors--greyscale-000)",color:"var(--c--theme--colors--primary-text)","label--color":"var(--c--theme--colors--greyscale-1000)","label--size":"var(--c--theme--font--sizes--sm)","label--weight":"500","text--color":"var(--c--theme--colors--greyscale-600)","text--size":"var(--c--theme--font--sizes--s)","text--weight":"400","text--color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-labelledbox":{"label-color--small":"ref(theme.colors.greyscale-950)","label-color--small--disabled":"ref(theme.colors.greyscale-300)","label-color--big":"ref(theme.colors.greyscale-950)","label-color--big--disabled":"ref(theme.colors.greyscale-300)"},"forms-radio":{"border-color":"var(--c--theme--colors--primary-800)","background-color":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)","accent-color-disabled":"var(--c--theme--colors--greyscale-300)"},"forms-switch":{"border--color-disabled":"var(--c--theme--colors--greyscale-300)","border--color":"var(--c--theme--colors--primary-800)","handle-background-color":"white","handle-background-color--disabled":"var(--c--theme--colors--greyscale-000)","rail-background-color--disabled":"var(--c--theme--colors--greyscale-000)","accent-color":"var(--c--theme--colors--primary-800)"},"forms-textarea":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-input":{"label-color--focus":"ref(theme.colors.greyscale-1000)","border-radius":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","value-color--disabled":"ref(theme.colors.greyscale-300)","font-size":"14px"},"forms-select":{"label-color--focus":"ref(theme.colors.greyscale-1000)","item-font-size":"14px","border-radius":"4px","border-radius-hover":"4px","border-color":"ref(theme.colors.greyscale-400)","box-shadow--color--hover":"ref(theme.colors.greyscale-400)","box-shadow--color--focus":"ref(theme.colors.primary-800)","value-color":"ref(theme.colors.greyscale-950)","font-size":"14px"}}}}},ar=()=>{const[t,e]=d.useState(window.innerWidth),n=parseInt(jo.themes.default.theme.breakpoints.mobile.replace("px","")),r=parseInt(jo.themes.default.theme.breakpoints.tablet.replace("px","")),i=()=>{e(window.innerWidth)};d.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]);const o=t<=n,a=t<=r,l=t>r;return{isMobile:o,isTablet:a,isDesktop:l}},sd=({children:t,isOpen:e=!1})=>{const{isDesktop:n}=ar();return n?w.jsx("div",{className:"c__left-panel",children:t}):w.jsx("div",{className:ot("c__left-panel__mobile",{open:e}),children:t})},{createElement:Sn,createContext:Og,createRef:Y4,forwardRef:ud,useCallback:$e,useContext:cd,useEffect:Pt,useImperativeHandle:dd,useLayoutEffect:_g,useMemo:Ig,useRef:xe,useState:pn}=T,Bl=T[`useId${Math.random()}`.slice(0,5)],kg=_g,mi=Og(null);mi.displayName="PanelGroupContext";const Dt=kg,Ng=typeof Bl=="function"?Bl:()=>null;let Rg=0;function Ea(t=null){const e=Ng(),n=xe(t||e||null);return n.current===null&&(n.current=""+Rg++),t??n.current}function fd({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:a,maxSize:l,minSize:s,onCollapse:u,onExpand:c,onResize:h,order:p,style:g,tagName:m="div",...f}){const v=cd(mi);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:C,getPanelSize:S,getPanelStyle:P,groupId:x,isPanelCollapsed:O,reevaluatePanelConstraints:D,registerPanel:b,resizePanel:k,unregisterPanel:V}=v,R=Ea(a),H=xe({callbacks:{onCollapse:u,onExpand:c,onResize:h},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:l,minSize:s},id:R,idIsFromProps:a!==void 0,order:p});xe({didLogMissingDefaultSizeWarning:!1}),Dt(()=>{const{callbacks:I,constraints:j}=H.current,W={...j};H.current.id=R,H.current.idIsFromProps=a!==void 0,H.current.order=p,I.onCollapse=u,I.onExpand=c,I.onResize=h,j.collapsedSize=n,j.collapsible=r,j.defaultSize=i,j.maxSize=l,j.minSize=s,(W.collapsedSize!==j.collapsedSize||W.collapsible!==j.collapsible||W.maxSize!==j.maxSize||W.minSize!==j.minSize)&&D(H.current,W)}),Dt(()=>{const I=H.current;return b(I),()=>{V(I)}},[p,R,b,V]),dd(o,()=>({collapse:()=>{y(H.current)},expand:I=>{C(H.current,I)},getId(){return R},getSize(){return S(H.current)},isCollapsed(){return O(H.current)},isExpanded(){return!O(H.current)},resize:I=>{k(H.current,I)}}),[y,C,S,O,R,k]);const E=P(H.current,i);return Sn(m,{...f,children:t,className:e,id:a,style:{...E,...g},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":x,"data-panel-id":R,"data-panel-size":parseFloat(""+E.flexGrow).toFixed(1)})}const Ho=ud((t,e)=>Sn(fd,{...t,forwardedRef:e}));fd.displayName="Panel";Ho.displayName="forwardRef(Panel)";let zo=null,Tt=null;function Lg(t,e){if(e){const n=(e&md)!==0,r=(e&yd)!==0,i=(e&bd)!==0,o=(e&Sd)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Mg(){Tt!==null&&(document.head.removeChild(Tt),zo=null,Tt=null)}function Ui(t,e){const n=Lg(t,e);zo!==n&&(zo=n,Tt===null&&(Tt=document.createElement("style"),document.head.appendChild(Tt)),Tt.innerHTML=`*{cursor: ${n}!important;}`)}function hd(t){return t.type==="keydown"}function pd(t){return t.type.startsWith("pointer")}function gd(t){return t.type.startsWith("mouse")}function yi(t){if(pd(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(gd(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Ag(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Kg(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Fg(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Gl(t),b:Gl(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;ee(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ul(Wl(n.a)),b:Ul(Wl(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let l=o.length;for(;l--;){const s=o[l];if(s===a.a)return 1;if(s===a.b)return-1}}return Math.sign(i.a-i.b)}const jg=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Hg(t){var e;const n=getComputedStyle((e=vd(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function zg(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Hg(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||jg.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Wl(t){let e=t.length;for(;e--;){const n=t[e];if(ee(n,"Missing node"),zg(n))return n}return null}function Ul(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Gl(t){const e=[];for(;t;)e.push(t),t=vd(t);return e}function vd(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const md=1,yd=2,bd=4,Sd=8,Vg=Ag()==="coarse";let ze=[],gn=!1,pt=new Map,bi=new Map;const Zn=new Set;function Bg(t,e,n,r,i){var o;const{ownerDocument:a}=e,l={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=pt.get(a))!==null&&o!==void 0?o:0;return pt.set(a,s+1),Zn.add(l),ti(),function(){var c;bi.delete(t),Zn.delete(l);const h=(c=pt.get(a))!==null&&c!==void 0?c:1;if(pt.set(a,h-1),ti(),h===1&&pt.delete(a),ze.includes(l)){const p=ze.indexOf(l);p>=0&&ze.splice(p,1),xa(),i("up",!0,null)}}}function ql(t){const{target:e}=t,{x:n,y:r}=yi(t);gn=!0,$a({target:e,x:n,y:r}),ti(),ze.length>0&&(ni("down",t),t.preventDefault(),t.stopPropagation())}function Nn(t){const{x:e,y:n}=yi(t);if(gn&&t.buttons===0&&(gn=!1,ni("up",t)),!gn){const{target:r}=t;$a({target:r,x:e,y:n})}ni("move",t),xa(),ze.length>0&&t.preventDefault()}function Ut(t){const{target:e}=t,{x:n,y:r}=yi(t);bi.clear(),gn=!1,ze.length>0&&t.preventDefault(),ni("up",t),$a({target:e,x:n,y:r}),xa(),ti()}function $a({target:t,x:e,y:n}){ze.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Zn.forEach(i=>{const{element:o,hitAreaMargins:a}=i,l=o.getBoundingClientRect(),{bottom:s,left:u,right:c,top:h}=l,p=Vg?a.coarse:a.fine;if(e>=u-p&&e<=c+p&&n>=h-p&&n<=s+p){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Fg(r,o)>0){let m=r,f=!1;for(;m&&!m.contains(o);){if(Kg(m.getBoundingClientRect(),l)){f=!0;break}m=m.parentElement}if(f)return}ze.push(i)}})}function Gi(t,e){bi.set(t,e)}function xa(){let t=!1,e=!1;ze.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;bi.forEach(r=>{n|=r}),t&&e?Ui("intersection",n):t?Ui("horizontal",n):e?Ui("vertical",n):Mg()}function ti(){pt.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Ut),n.removeEventListener("pointerdown",ql),n.removeEventListener("pointerleave",Nn),n.removeEventListener("pointermove",Nn)}),window.removeEventListener("pointerup",Ut),window.removeEventListener("pointercancel",Ut),Zn.size>0&&(gn?(ze.length>0&&pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Ut),n.addEventListener("pointerleave",Nn),n.addEventListener("pointermove",Nn))}),window.addEventListener("pointerup",Ut),window.addEventListener("pointercancel",Ut)):pt.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",ql,{capture:!0}),n.addEventListener("pointermove",Nn))}))}function ni(t,e){Zn.forEach(n=>{const{setResizeHandlerState:r}=n,i=ze.includes(n);r(t,i,e)})}function Wg(){const[t,e]=pn(0);return $e(()=>e(n=>n+1),[])}function ee(t,e){if(!t)throw console.error(e),Error(e)}const Ta=10;function Lt(t,e,n=Ta){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function nt(t,e,n=Ta){return Lt(t,e,n)===0}function Te(t,e,n){return Lt(t,e,n)===0}function Ug(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],o=e[r];if(!Te(i,o,n))return!1}return!0}function dn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];ee(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:l=0}=r;if(Lt(n,l)<0)if(o){const s=(i+l)/2;Lt(n,s)<0?n=i:n=l}else n=l;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ta)),n}function Fn({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Te(t,0))return e;const a=[...e],[l,s]=r;ee(l!=null,"Invalid first pivot index"),ee(s!=null,"Invalid second pivot index");let u=0;if(o==="keyboard"){{const h=t<0?s:l,p=n[h];ee(p,`Panel constraints not found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,g)){const y=f-v;Lt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}{const h=t<0?l:s,p=n[h];ee(p,`No panel constraints found for index ${h}`);const{collapsedSize:g=0,collapsible:m,minSize:f=0}=p;if(m){const v=e[h];if(ee(v!=null,`Previous layout not found for panel index ${h}`),Te(v,f)){const y=v-g;Lt(y,Math.abs(t))>0&&(t=t<0?0-y:y)}}}}{const h=t<0?1:-1;let p=t<0?s:l,g=0;for(;;){const f=e[p];ee(f!=null,`Previous layout not found for panel index ${p}`);const y=dn({panelConstraints:n,panelIndex:p,size:100})-f;if(g+=y,p+=h,p<0||p>=n.length)break}const m=Math.min(Math.abs(t),Math.abs(g));t=t<0?0-m:m}{let p=t<0?l:s;for(;p>=0&&p<n.length;){const g=Math.abs(t)-Math.abs(u),m=e[p];ee(m!=null,`Previous layout not found for panel index ${p}`);const f=m-g,v=dn({panelConstraints:n,panelIndex:p,size:f});if(!Te(m,v)&&(u+=m-v,a[p]=v,u.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?p--:p++}}if(Ug(i,a))return i;{const h=t<0?s:l,p=e[h];ee(p!=null,`Previous layout not found for panel index ${h}`);const g=p+u,m=dn({panelConstraints:n,panelIndex:h,size:g});if(a[h]=m,!Te(m,g)){let f=g-m,y=t<0?s:l;for(;y>=0&&y<n.length;){const C=a[y];ee(C!=null,`Previous layout not found for panel index ${y}`);const S=C+f,P=dn({panelConstraints:n,panelIndex:y,size:S});if(Te(C,P)||(f-=P-C,a[y]=P),Te(f,0))break;t>0?y--:y++}}}const c=a.reduce((h,p)=>p+h,0);return Te(c,100)?a:i}function Gg({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,o=0,a=0;const l=n[0];ee(l!=null,"No pivot index found"),e.forEach((h,p)=>{const{constraints:g}=h,{maxSize:m=100,minSize:f=0}=g;p===l?(r=f,i=m):(o+=f,a+=m)});const s=Math.min(i,100-o),u=Math.max(r,100-a),c=t[l];return{valueMax:s,valueMin:u,valueNow:c}}function Xn(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function Cd(t,e,n=document){const i=Xn(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e);return i??null}function wd(t,e,n){const r=Cd(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Ed(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Si(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function qg(t,e,n,r=document){var i,o,a,l;const s=Si(e,r),u=Xn(t,r),c=s?u.indexOf(s):-1,h=(i=(o=n[c])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,p=(a=(l=n[c+1])===null||l===void 0?void 0:l.id)!==null&&a!==void 0?a:null;return[h,p]}function Yg({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:a}){xe({didWarnAboutMissingResizeHandle:!1}),Dt(()=>{if(!o)return;const l=Xn(n,o);for(let s=0;s<i.length-1;s++){const{valueMax:u,valueMin:c,valueNow:h}=Gg({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),p=l[s];if(p!=null){const g=i[s];ee(g,`No panel data found for index "${s}"`),p.setAttribute("aria-controls",g.id),p.setAttribute("aria-valuemax",""+Math.round(u)),p.setAttribute("aria-valuemin",""+Math.round(c)),p.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{l.forEach((s,u)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[n,r,i,o]),Pt(()=>{if(!o)return;const l=e.current;ee(l,"Eager values not found");const{panelDataArray:s}=l,u=Ed(n,o);ee(u!=null,`No group found for id "${n}"`);const c=Xn(n,o);ee(c,`No resize handles found for group id "${n}"`);const h=c.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");ee(g,"Resize handle element has no handle id attribute");const[m,f]=qg(n,g,s,o);if(m==null||f==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const C=s.findIndex(S=>S.id===m);if(C>=0){const S=s[C];ee(S,`No panel data found for index ${C}`);const P=r[C],{collapsedSize:x=0,collapsible:O,minSize:D=0}=S.constraints;if(P!=null&&O){const b=Fn({delta:Te(P,x)?D-x:x-P,initialLayout:r,panelConstraints:s.map(k=>k.constraints),pivotIndices:wd(n,g,o),prevLayout:r,trigger:"keyboard"});r!==b&&a(b)}}break}}};return p.addEventListener("keydown",v),()=>{p.removeEventListener("keydown",v)}});return()=>{h.forEach(p=>p())}},[o,t,e,n,r,i,a])}function Yl(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function $d(t,e){const n=t==="horizontal",{x:r,y:i}=yi(e);return n?r:i}function Zg(t,e,n,r,i){const o=n==="horizontal",a=Si(e,i);ee(a,`No resize handle element found for id "${e}"`);const l=a.getAttribute("data-panel-group-id");ee(l,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const u=$d(n,t),c=Ed(l,i);ee(c,`No group element found for id "${l}"`);const h=c.getBoundingClientRect(),p=o?h.width:h.height;return(u-s)/p*100}function Xg(t,e,n,r,i,o){if(hd(t)){const a=n==="horizontal";let l=0;t.shiftKey?l=100:i!=null?l=i:l=10;let s=0;switch(t.key){case"ArrowDown":s=a?0:l;break;case"ArrowLeft":s=a?-l:0;break;case"ArrowRight":s=a?l:0;break;case"ArrowUp":s=a?0:-l;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:Zg(t,e,n,r,o)}function Jg({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:l}=a;l!=null&&(r++,e[o]=l,i-=l)}for(let o=0;o<t.length;o++){const a=n[o];ee(a,`Panel constraints not found for index ${o}`);const{defaultSize:l}=a;if(l!=null)continue;const s=t.length-r,u=i/s;r++,e[o]=u,i-=u}return e}function Gt(t,e,n){e.forEach((r,i)=>{const o=t[i];ee(o,`Panel data not found for index ${i}`);const{callbacks:a,constraints:l,id:s}=o,{collapsedSize:u=0,collapsible:c}=l,h=n[s];if(h==null||r!==h){n[s]=r;const{onCollapse:p,onExpand:g,onResize:m}=a;m&&m(r,h),c&&(p||g)&&(g&&(h==null||nt(h,u))&&!nt(r,u)&&g(),p&&(h==null||!nt(h,u))&&nt(r,u)&&p())}})}function Cr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function Qg({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:o=3}){const a=n[i];let l;return a==null?l=t!=null?t.toPrecision(o):"1":r.length===1?l="1":l=a.toPrecision(o),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function e5(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function Zl(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function xd(t){return`react-resizable-panels:${t}`}function Td(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Pd(t,e){try{const n=xd(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function t5(t,e,n){var r,i;const o=(r=Pd(t,n))!==null&&r!==void 0?r:{},a=Td(e);return(i=o[a])!==null&&i!==void 0?i:null}function n5(t,e,n,r,i){var o;const a=xd(t),l=Td(e),s=(o=Pd(t,i))!==null&&o!==void 0?o:{};s[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(u){console.error(u)}}function Xl({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((o,a)=>o+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Te(r,100)&&n.length>0)for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const l=100/r*a;n[o]=l}let i=0;for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const l=dn({panelConstraints:e,panelIndex:o,size:a});a!=l&&(i+=a-l,n[o]=l)}if(!Te(i,0))for(let o=0;o<e.length;o++){const a=n[o];ee(a!=null,`No layout data found for index ${o}`);const l=a+i,s=dn({panelConstraints:e,panelIndex:o,size:l});if(a!==s&&(i-=s-a,n[o]=s,Te(i,0)))break}return n}const r5=100,jn={getItem:t=>(Zl(jn),jn.getItem(t)),setItem:(t,e)=>{Zl(jn),jn.setItem(t,e)}},Jl={};function Dd({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:l=null,storage:s=jn,style:u,tagName:c="div",...h}){const p=Ea(o),g=xe(null),[m,f]=pn(null),[v,y]=pn([]),C=Wg(),S=xe({}),P=xe(new Map),x=xe(0),O=xe({autoSaveId:t,direction:r,dragState:m,id:p,keyboardResizeBy:l,onLayout:a,storage:s}),D=xe({layout:v,panelDataArray:[],panelDataArrayChanged:!1});xe({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),dd(i,()=>({getId:()=>O.current.id,getLayout:()=>{const{layout:N}=D.current;return N},setLayout:N=>{const{onLayout:K}=O.current,{layout:A,panelDataArray:z}=D.current,B=Xl({layout:N,panelConstraints:z.map(F=>F.constraints)});Yl(A,B)||(y(B),D.current.layout=B,K&&K(B),Gt(z,B,S.current))}}),[]),Dt(()=>{O.current.autoSaveId=t,O.current.direction=r,O.current.dragState=m,O.current.id=p,O.current.onLayout=a,O.current.storage=s}),Yg({committedValuesRef:O,eagerValuesRef:D,groupId:p,layout:v,panelDataArray:D.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),Pt(()=>{const{panelDataArray:N}=D.current;if(t){if(v.length===0||v.length!==N.length)return;let K=Jl[t];K==null&&(K=e5(n5,r5),Jl[t]=K);const A=[...N],z=new Map(P.current);K(t,A,z,v,s)}},[t,v,s]),Pt(()=>{});const b=$e(N=>{const{onLayout:K}=O.current,{layout:A,panelDataArray:z}=D.current;if(N.constraints.collapsible){const B=z.map(de=>de.constraints),{collapsedSize:F=0,panelSize:X,pivotIndices:te}=St(z,N,A);if(ee(X!=null,`Panel size not found for panel "${N.id}"`),!nt(X,F)){P.current.set(N.id,X);const ce=ln(z,N)===z.length-1?X-F:F-X,oe=Fn({delta:ce,initialLayout:A,panelConstraints:B,pivotIndices:te,prevLayout:A,trigger:"imperative-api"});Cr(A,oe)||(y(oe),D.current.layout=oe,K&&K(oe),Gt(z,oe,S.current))}}},[]),k=$e((N,K)=>{const{onLayout:A}=O.current,{layout:z,panelDataArray:B}=D.current;if(N.constraints.collapsible){const F=B.map(ge=>ge.constraints),{collapsedSize:X=0,panelSize:te=0,minSize:de=0,pivotIndices:ce}=St(B,N,z),oe=K??de;if(nt(te,X)){const ge=P.current.get(N.id),re=ge!=null&&ge>=oe?ge:oe,lt=ln(B,N)===B.length-1?te-re:re-te,ve=Fn({delta:lt,initialLayout:z,panelConstraints:F,pivotIndices:ce,prevLayout:z,trigger:"imperative-api"});Cr(z,ve)||(y(ve),D.current.layout=ve,A&&A(ve),Gt(B,ve,S.current))}}},[]),V=$e(N=>{const{layout:K,panelDataArray:A}=D.current,{panelSize:z}=St(A,N,K);return ee(z!=null,`Panel size not found for panel "${N.id}"`),z},[]),R=$e((N,K)=>{const{panelDataArray:A}=D.current,z=ln(A,N);return Qg({defaultSize:K,dragState:m,layout:v,panelData:A,panelIndex:z})},[m,v]),H=$e(N=>{const{layout:K,panelDataArray:A}=D.current,{collapsedSize:z=0,collapsible:B,panelSize:F}=St(A,N,K);return ee(F!=null,`Panel size not found for panel "${N.id}"`),B===!0&&nt(F,z)},[]),E=$e(N=>{const{layout:K,panelDataArray:A}=D.current,{collapsedSize:z=0,collapsible:B,panelSize:F}=St(A,N,K);return ee(F!=null,`Panel size not found for panel "${N.id}"`),!B||Lt(F,z)>0},[]),I=$e(N=>{const{panelDataArray:K}=D.current;K.push(N),K.sort((A,z)=>{const B=A.order,F=z.order;return B==null&&F==null?0:B==null?-1:F==null?1:B-F}),D.current.panelDataArrayChanged=!0,C()},[C]);Dt(()=>{if(D.current.panelDataArrayChanged){D.current.panelDataArrayChanged=!1;const{autoSaveId:N,onLayout:K,storage:A}=O.current,{layout:z,panelDataArray:B}=D.current;let F=null;if(N){const te=t5(N,B,A);te&&(P.current=new Map(Object.entries(te.expandToSizes)),F=te.layout)}F==null&&(F=Jg({panelDataArray:B}));const X=Xl({layout:F,panelConstraints:B.map(te=>te.constraints)});Yl(z,X)||(y(X),D.current.layout=X,K&&K(X),Gt(B,X,S.current))}}),Dt(()=>{const N=D.current;return()=>{N.layout=[]}},[]);const j=$e(N=>{let K=!1;const A=g.current;return A&&window.getComputedStyle(A,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(B){B.preventDefault();const F=g.current;if(!F)return()=>null;const{direction:X,dragState:te,id:de,keyboardResizeBy:ce,onLayout:oe}=O.current,{layout:ge,panelDataArray:re}=D.current,{initialLayout:We}=te??{},lt=wd(de,N,F);let ve=Xg(B,N,X,te,ce,F);const Pn=X==="horizontal";Pn&&K&&(ve=-ve);const sr=re.map(q=>q.constraints),$=Fn({delta:ve,initialLayout:We??ge,panelConstraints:sr,pivotIndices:lt,prevLayout:ge,trigger:hd(B)?"keyboard":"mouse-or-touch"}),U=!Cr(ge,$);(pd(B)||gd(B))&&x.current!=ve&&(x.current=ve,!U&&ve!==0?Pn?Gi(N,ve<0?md:yd):Gi(N,ve<0?bd:Sd):Gi(N,0)),U&&(y($),D.current.layout=$,oe&&oe($),Gt(re,$,S.current))}},[]),W=$e((N,K)=>{const{onLayout:A}=O.current,{layout:z,panelDataArray:B}=D.current,F=B.map(ge=>ge.constraints),{panelSize:X,pivotIndices:te}=St(B,N,z);ee(X!=null,`Panel size not found for panel "${N.id}"`);const ce=ln(B,N)===B.length-1?X-K:K-X,oe=Fn({delta:ce,initialLayout:z,panelConstraints:F,pivotIndices:te,prevLayout:z,trigger:"imperative-api"});Cr(z,oe)||(y(oe),D.current.layout=oe,A&&A(oe),Gt(B,oe,S.current))},[]),Z=$e((N,K)=>{const{layout:A,panelDataArray:z}=D.current,{collapsedSize:B=0,collapsible:F}=K,{collapsedSize:X=0,collapsible:te,maxSize:de=100,minSize:ce=0}=N.constraints,{panelSize:oe}=St(z,N,A);oe!=null&&(F&&te&&nt(oe,B)?nt(B,X)||W(N,X):oe<ce?W(N,ce):oe>de&&W(N,de))},[W]),_=$e((N,K)=>{const{direction:A}=O.current,{layout:z}=D.current;if(!g.current)return;const B=Si(N,g.current);ee(B,`Drag handle element not found for id "${N}"`);const F=$d(A,K);f({dragHandleId:N,dragHandleRect:B.getBoundingClientRect(),initialCursorPosition:F,initialLayout:z})},[]),M=$e(()=>{f(null)},[]),G=$e(N=>{const{panelDataArray:K}=D.current,A=ln(K,N);A>=0&&(K.splice(A,1),delete S.current[N.id],D.current.panelDataArrayChanged=!0,C())},[C]),Y=Ig(()=>({collapsePanel:b,direction:r,dragState:m,expandPanel:k,getPanelSize:V,getPanelStyle:R,groupId:p,isPanelCollapsed:H,isPanelExpanded:E,reevaluatePanelConstraints:Z,registerPanel:I,registerResizeHandle:j,resizePanel:W,startDragging:_,stopDragging:M,unregisterPanel:G,panelGroupElement:g.current}),[b,m,r,k,V,R,p,H,E,Z,I,j,W,_,M,G]),L={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sn(mi.Provider,{value:Y},Sn(c,{...h,children:e,className:n,id:o,ref:g,style:{...L,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":p}))}const Od=ud((t,e)=>Sn(Dd,{...t,forwardedRef:e}));Dd.displayName="PanelGroup";Od.displayName="forwardRef(PanelGroup)";function ln(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function St(t,e,n){const r=ln(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function i5({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Pt(()=>{if(t||n==null||r==null)return;const i=Si(e,r);if(i==null)return;const o=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const l=i.getAttribute("data-panel-group-id");ee(l,`No group element found for id "${l}"`);const s=Xn(l,r),u=Cd(l,e,r);ee(u!==null,`No resize element found for id "${e}"`);const c=a.shiftKey?u>0?u-1:s.length-1:u+1<s.length?u+1:0;s[c].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,t,e,n])}function _d({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onDragging:a,onFocus:l,style:s={},tabIndex:u=0,tagName:c="div",...h}){var p,g;const m=xe(null),f=xe({onDragging:a});Pt(()=>{f.current.onDragging=a});const v=cd(mi);if(v===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:y,groupId:C,registerResizeHandle:S,startDragging:P,stopDragging:x,panelGroupElement:O}=v,D=Ea(i),[b,k]=pn("inactive"),[V,R]=pn(!1),[H,E]=pn(null),I=xe({state:b});Dt(()=>{I.current.state=b}),Pt(()=>{if(n)E(null);else{const _=S(D);E(()=>_)}},[n,D,S]);const j=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,W=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return Pt(()=>{if(n||H==null)return;const _=m.current;return ee(_,"Element ref not attached"),Bg(D,_,y,{coarse:j,fine:W},(G,Y,L)=>{if(Y)switch(G){case"down":{k("drag"),ee(L,'Expected event to be defined for "down" action'),P(D,L);const{onDragging:N}=f.current;N&&N(!0);break}case"move":{const{state:N}=I.current;N!=="drag"&&k("hover"),ee(L,'Expected event to be defined for "move" action'),H(L);break}case"up":{k("hover"),x();const{onDragging:N}=f.current;N&&N(!1);break}}else k("inactive")})},[j,y,n,W,S,D,H,P,x]),i5({disabled:n,handleId:D,resizeHandler:H,panelGroupElement:O}),Sn(c,{...h,children:t,className:e,id:i,onBlur:()=>{R(!1),o==null||o()},onFocus:()=>{R(!0),l==null||l()},ref:m,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...s},tabIndex:u,"data-panel-group-direction":y,"data-panel-group-id":C,"data-resize-handle":"","data-resize-handle-active":b==="drag"?"pointer":V?"keyboard":void 0,"data-resize-handle-state":b,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":D})}_d.displayName="PanelResizeHandle";const o5=({children:t,isOpen:e})=>{const{isDesktop:n}=ar();return n?w.jsx("div",{className:ot("c__right-panel",{open:e}),children:t}):w.jsx("div",{className:ot("c__right-panel__mobile",{open:e}),children:t})},a5=({icon:t,children:e,hideLeftPanelOnDesktop:n=!1,leftPanelContent:r,rightPanelContent:i,rightHeaderContent:o,languages:a,enableResize:l=!1,rightPanelIsOpen:s=!1})=>{const[u,c]=d.useState(!1),{isDesktop:h}=ar(),p=d.useRef(null),[g,m]=d.useState(wr(300,h)),[f,v]=d.useState(wr(450,h)),y=()=>{c(!u)};d.useEffect(()=>{const P=()=>{const x=Math.round(wr(300,h)),O=Math.round(Math.min(wr(450,h),40));m(h?x:0),v(l?O:x)};return P(),window.addEventListener("resize",()=>{P()}),()=>{window.removeEventListener("resize",P)}},[h,l]);const C=h?!n:!0,S=h?!n:u;return w.jsxs("div",{className:"c__main-layout",children:[w.jsx("div",{className:"c__main-layout__header",children:w.jsx(ld,{onTogglePanel:y,isPanelOpen:u,rightIcon:o,leftIcon:t,languages:a})}),w.jsx("div",{className:"c__main-layout__content",children:w.jsxs(Od,{autoSaveId:"persistance",direction:"horizontal",children:[C&&w.jsxs(w.Fragment,{children:[w.jsx(Ho,{ref:p,order:0,defaultSize:g,minSize:g,maxSize:f,children:w.jsx(sd,{isOpen:S,children:r})}),h&&w.jsx(_d,{className:"bg-greyscale-200",style:{width:"1px"}})]}),w.jsx(Ho,{order:1,children:w.jsxs("div",{className:"c__main-layout__content__center",children:[w.jsx("div",{className:"c__main-layout__content__center__children",children:e}),w.jsx(o5,{isOpen:s,children:i})]})})]})})]})},wr=(t,e)=>{if(!e)return 0;const n=window.innerWidth;return t/n*100},l5=52,Pa=({size:t="sm"})=>w.jsx("div",{className:["c__spinner",t].join(" ")}),Id=({children:t,text:e,...n})=>w.jsxs("div",{className:"suite__label__container",children:[w.jsx("label",{...n,children:t}),e&&w.jsx("span",{className:"suite__label__container__description",children:e})]}),s5=({label:t,text:e,labelSide:n="right",children:r})=>w.jsxs("div",{className:ot("c__with-label",{[n]:!0}),children:[w.jsx(Id,{children:t,text:e}),r]});var Ql=1,u5=.9,c5=.8,d5=.17,qi=.1,Yi=.999,f5=.9999,h5=.99,p5=/[\\\/_+.#"@\[\(\{&]/,g5=/[\\\/_+.#"@\[\(\{&]/g,v5=/[\s-]/,kd=/[\s-]/g;function Vo(t,e,n,r,i,o,a){if(o===e.length)return i===t.length?Ql:h5;var l=`${i},${o}`;if(a[l]!==void 0)return a[l];for(var s=r.charAt(o),u=n.indexOf(s,i),c=0,h,p,g,m;u>=0;)h=Vo(t,e,n,r,u+1,o+1,a),h>c&&(u===i?h*=Ql:p5.test(t.charAt(u-1))?(h*=c5,g=t.slice(i,u-1).match(g5),g&&i>0&&(h*=Math.pow(Yi,g.length))):v5.test(t.charAt(u-1))?(h*=u5,m=t.slice(i,u-1).match(kd),m&&i>0&&(h*=Math.pow(Yi,m.length))):(h*=d5,i>0&&(h*=Math.pow(Yi,u-i))),t.charAt(u)!==e.charAt(o)&&(h*=f5)),(h<qi&&n.charAt(u-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(u-1)!==r.charAt(o))&&(p=Vo(t,e,n,r,u+1,o+2,a),p*qi>h&&(h=p*qi)),h>c&&(c=h),u=n.indexOf(s,u+1);return a[l]=c,c}function es(t){return t.toLowerCase().replace(kd," ")}function m5(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Vo(t,e,es(t),es(e),0,0,{})}function mt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function ts(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Nd(...t){return e=>{let n=!1;const r=t.map(i=>{const o=ts(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():ts(t[i],null)}}}}function zt(...t){return T.useCallback(Nd(...t),t)}function y5(t,e){const n=T.createContext(e),r=o=>{const{children:a,...l}=o,s=T.useMemo(()=>l,Object.values(l));return w.jsx(n.Provider,{value:s,children:a})};r.displayName=t+"Provider";function i(o){const a=T.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function b5(t,e=[]){let n=[];function r(o,a){const l=T.createContext(a),s=n.length;n=[...n,a];const u=h=>{var y;const{scope:p,children:g,...m}=h,f=((y=p==null?void 0:p[t])==null?void 0:y[s])||l,v=T.useMemo(()=>m,Object.values(m));return w.jsx(f.Provider,{value:v,children:g})};u.displayName=o+"Provider";function c(h,p){var f;const g=((f=p==null?void 0:p[t])==null?void 0:f[s])||l,m=T.useContext(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>T.createContext(a));return function(l){const s=(l==null?void 0:l[t])||o;return T.useMemo(()=>({[`__scope${t}`]:{...l,[t]:s}}),[l,s])}};return i.scopeName=t,[r,S5(i,...e)]}function S5(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((l,{useScope:s,scopeName:u})=>{const h=s(o)[`__scope${u}`];return{...l,...h}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var ri=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},C5=T.useId||(()=>{}),w5=0;function it(t){const[e,n]=T.useState(C5());return ri(()=>{n(r=>r??String(w5++))},[t]),e?`radix-${e}`:""}function Mt(t){const e=T.useRef(t);return T.useEffect(()=>{e.current=t}),T.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function E5({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=$5({defaultProp:e,onChange:n}),o=t!==void 0,a=o?t:r,l=Mt(n),s=T.useCallback(u=>{if(o){const h=typeof u=="function"?u(t):u;h!==t&&l(h)}else i(u)},[o,t,i,l]);return[a,s]}function $5({defaultProp:t,onChange:e}){const n=T.useState(t),[r]=n,i=T.useRef(r),o=Mt(e);return T.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var Da=T.forwardRef((t,e)=>{const{children:n,...r}=t,i=T.Children.toArray(n),o=i.find(T5);if(o){const a=o.props.children,l=i.map(s=>s===o?T.Children.count(a)>1?T.Children.only(null):T.isValidElement(a)?a.props.children:null:s);return w.jsx(Bo,{...r,ref:e,children:T.isValidElement(a)?T.cloneElement(a,void 0,l):null})}return w.jsx(Bo,{...r,ref:e,children:n})});Da.displayName="Slot";var Bo=T.forwardRef((t,e)=>{const{children:n,...r}=t;if(T.isValidElement(n)){const i=D5(n),o=P5(r,n.props);return n.type!==T.Fragment&&(o.ref=e?Nd(e,i):i),T.cloneElement(n,o)}return T.Children.count(n)>1?T.Children.only(null):null});Bo.displayName="SlotClone";var x5=({children:t})=>w.jsx(w.Fragment,{children:t});function T5(t){return T.isValidElement(t)&&t.type===x5}function P5(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{o(...l),i(...l)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function D5(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var O5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],be=O5.reduce((t,e)=>{const n=T.forwardRef((r,i)=>{const{asChild:o,...a}=r,l=o?Da:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function _5(t,e){t&&c0.flushSync(()=>t.dispatchEvent(e))}function I5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t);T.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var k5="DismissableLayer",Wo="dismissableLayer.update",N5="dismissableLayer.pointerDownOutside",R5="dismissableLayer.focusOutside",ns,Rd=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ld=T.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...s}=t,u=T.useContext(Rd),[c,h]=T.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=T.useState({}),m=zt(e,D=>h(D)),f=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=f.indexOf(v),C=c?f.indexOf(c):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=y,x=A5(D=>{const b=D.target,k=[...u.branches].some(V=>V.contains(b));!P||k||(i==null||i(D),a==null||a(D),D.defaultPrevented||l==null||l())},p),O=K5(D=>{const b=D.target;[...u.branches].some(V=>V.contains(b))||(o==null||o(D),a==null||a(D),D.defaultPrevented||l==null||l())},p);return I5(D=>{C===u.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},p),T.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ns=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),rs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ns)}},[c,p,n,u]),T.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),rs())},[c,u]),T.useEffect(()=>{const D=()=>g({});return document.addEventListener(Wo,D),()=>document.removeEventListener(Wo,D)},[]),w.jsx(be.div,{...s,ref:m,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:mt(t.onFocusCapture,O.onFocusCapture),onBlurCapture:mt(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:mt(t.onPointerDownCapture,x.onPointerDownCapture)})});Ld.displayName=k5;var L5="DismissableLayerBranch",M5=T.forwardRef((t,e)=>{const n=T.useContext(Rd),r=T.useRef(null),i=zt(e,r);return T.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),w.jsx(be.div,{...t,ref:i})});M5.displayName=L5;function A5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=T.useRef(!1),i=T.useRef(()=>{});return T.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let s=function(){Md(N5,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=s,e.addEventListener("click",i.current,{once:!0})):s()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function K5(t,e=globalThis==null?void 0:globalThis.document){const n=Mt(t),r=T.useRef(!1);return T.useEffect(()=>{const i=o=>{o.target&&!r.current&&Md(R5,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rs(){const t=new CustomEvent(Wo);document.dispatchEvent(t)}function Md(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?_5(i,o):i.dispatchEvent(o)}var Zi="focusScope.autoFocusOnMount",Xi="focusScope.autoFocusOnUnmount",is={bubbles:!1,cancelable:!0},F5="FocusScope",Ad=T.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=t,[l,s]=T.useState(null),u=Mt(i),c=Mt(o),h=T.useRef(null),p=zt(e,f=>s(f)),g=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(r){let f=function(S){if(g.paused||!l)return;const P=S.target;l.contains(P)?h.current=P:ct(h.current,{select:!0})},v=function(S){if(g.paused||!l)return;const P=S.relatedTarget;P!==null&&(l.contains(P)||ct(h.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const x of S)x.removedNodes.length>0&&ct(l)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const C=new MutationObserver(y);return l&&C.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),C.disconnect()}}},[r,l,g.paused]),T.useEffect(()=>{if(l){as.add(g);const f=document.activeElement;if(!l.contains(f)){const y=new CustomEvent(Zi,is);l.addEventListener(Zi,u),l.dispatchEvent(y),y.defaultPrevented||(j5(W5(Kd(l)),{select:!0}),document.activeElement===f&&ct(l))}return()=>{l.removeEventListener(Zi,u),setTimeout(()=>{const y=new CustomEvent(Xi,is);l.addEventListener(Xi,c),l.dispatchEvent(y),y.defaultPrevented||ct(f??document.body,{select:!0}),l.removeEventListener(Xi,c),as.remove(g)},0)}}},[l,u,c,g]);const m=T.useCallback(f=>{if(!n&&!r||g.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(v&&y){const C=f.currentTarget,[S,P]=H5(C);S&&P?!f.shiftKey&&y===P?(f.preventDefault(),n&&ct(S,{select:!0})):f.shiftKey&&y===S&&(f.preventDefault(),n&&ct(P,{select:!0})):y===C&&f.preventDefault()}},[n,r,g.paused]);return w.jsx(be.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});Ad.displayName=F5;function j5(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ct(r,{select:e}),document.activeElement!==n)return}function H5(t){const e=Kd(t),n=os(e,t),r=os(e.reverse(),t);return[n,r]}function Kd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function os(t,e){for(const n of t)if(!z5(n,{upTo:e}))return n}function z5(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function V5(t){return t instanceof HTMLInputElement&&"select"in t}function ct(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&V5(t)&&e&&t.select()}}var as=B5();function B5(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=ls(t,e),t.unshift(e)},remove(e){var n;t=ls(t,e),(n=t[0])==null||n.resume()}}}function ls(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function W5(t){return t.filter(e=>e.tagName!=="A")}var U5="Portal",Fd=T.forwardRef((t,e)=>{var l;const{container:n,...r}=t,[i,o]=T.useState(!1);ri(()=>o(!0),[]);const a=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Ht.createPortal(w.jsx(be.div,{...r,ref:e}),a):null});Fd.displayName=U5;function G5(t,e){return T.useReducer((n,r)=>e[n][r]??n,t)}var Ci=t=>{const{present:e,children:n}=t,r=q5(e),i=typeof n=="function"?n({present:r.isPresent}):T.Children.only(n),o=zt(r.ref,Y5(i));return typeof n=="function"||r.isPresent?T.cloneElement(i,{ref:o}):null};Ci.displayName="Presence";function q5(t){const[e,n]=T.useState(),r=T.useRef({}),i=T.useRef(t),o=T.useRef("none"),a=t?"mounted":"unmounted",[l,s]=G5(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const u=Er(r.current);o.current=l==="mounted"?u:"none"},[l]),ri(()=>{const u=r.current,c=i.current;if(c!==t){const p=o.current,g=Er(u);t?s("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?s("UNMOUNT"):s(c&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,s]),ri(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,h=g=>{const f=Er(r.current).includes(g.animationName);if(g.target===e&&f&&(s("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},p=g=>{g.target===e&&(o.current=Er(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:T.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Er(t){return(t==null?void 0:t.animationName)||"none"}function Y5(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ji=0;function Z5(){T.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ss()),document.body.insertAdjacentElement("beforeend",t[1]??ss()),Ji++,()=>{Ji===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ji--}},[])}function ss(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Nr="right-scroll-bar-position",Rr="width-before-scroll-bar",X5="with-scroll-bars-hidden",J5="--removed-body-scroll-bar-size";function Qi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Q5(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var ev=typeof window<"u"?T.useLayoutEffect:T.useEffect,us=new WeakMap;function tv(t,e){var n=Q5(null,function(r){return t.forEach(function(i){return Qi(i,r)})});return ev(function(){var r=us.get(n);if(r){var i=new Set(r),o=new Set(t),a=n.current;i.forEach(function(l){o.has(l)||Qi(l,null)}),o.forEach(function(l){i.has(l)||Qi(l,a)})}us.set(n,t)},[t]),n}function nv(t){return t}function rv(t,e){e===void 0&&(e=nv);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var a=e(o,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(o),a=n}var s=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(s)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function iv(t){t===void 0&&(t={});var e=rv(null);return e.options=Ge({async:!0,ssr:!1},t),e}var jd=function(t){var e=t.sideCar,n=lc(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return T.createElement(r,Ge({},n))};jd.isSideCarExport=!0;function ov(t,e){return t.useMedium(e),jd}var Hd=iv(),eo=function(){},wi=T.forwardRef(function(t,e){var n=T.useRef(null),r=T.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),i=r[0],o=r[1],a=t.forwardProps,l=t.children,s=t.className,u=t.removeScrollBar,c=t.enabled,h=t.shards,p=t.sideCar,g=t.noIsolation,m=t.inert,f=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,C=t.gapMode,S=lc(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,x=tv([n,e]),O=Ge(Ge({},S),i);return T.createElement(T.Fragment,null,c&&T.createElement(P,{sideCar:Hd,removeScrollBar:u,shards:h,noIsolation:g,inert:m,setCallbacks:o,allowPinchZoom:!!f,lockRef:n,gapMode:C}),a?T.cloneElement(T.Children.only(l),Ge(Ge({},O),{ref:x})):T.createElement(y,Ge({},O,{className:s,ref:x}),l))});wi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wi.classNames={fullWidth:Rr,zeroRight:Nr};var av=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lv(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=av();return e&&t.setAttribute("nonce",e),t}function sv(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function uv(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var cv=function(){var t=0,e=null;return{add:function(n){t==0&&(e=lv())&&(sv(e,n),uv(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},dv=function(){var t=cv();return function(e,n){T.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},zd=function(){var t=dv(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},fv={left:0,top:0,right:0,gap:0},to=function(t){return parseInt(t||"",10)||0},hv=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[to(n),to(r),to(i)]},pv=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return fv;var e=hv(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},gv=zd(),vn="data-scroll-locked",vv=function(t,e,n,r){var i=t.left,o=t.top,a=t.right,l=t.gap;return n===void 0&&(n="margin"),`
|
|
48
|
+
.`.concat(X5,` {
|
|
49
49
|
overflow: hidden `).concat(r,`;
|
|
50
|
-
padding-right: `).concat(
|
|
50
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
51
51
|
}
|
|
52
|
-
body[`).concat(
|
|
52
|
+
body[`).concat(vn,`] {
|
|
53
53
|
overflow: hidden `).concat(r,`;
|
|
54
54
|
overscroll-behavior: contain;
|
|
55
55
|
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -58,45 +58,45 @@ Check the top-level render call using <`+$+">."),V}var w=d,P=Symbol.for("react.t
|
|
|
58
58
|
padding-right: `).concat(a,`px;
|
|
59
59
|
margin-left:0;
|
|
60
60
|
margin-top:0;
|
|
61
|
-
margin-right: `).concat(
|
|
62
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
61
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
62
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.`).concat(
|
|
66
|
-
right: `).concat(
|
|
65
|
+
.`).concat(Nr,` {
|
|
66
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.`).concat(
|
|
70
|
-
margin-right: `).concat(
|
|
69
|
+
.`).concat(Rr,` {
|
|
70
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.`).concat(
|
|
73
|
+
.`).concat(Nr," .").concat(Nr,` {
|
|
74
74
|
right: 0 `).concat(r,`;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.`).concat(
|
|
77
|
+
.`).concat(Rr," .").concat(Rr,` {
|
|
78
78
|
margin-right: 0 `).concat(r,`;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
body[`).concat(
|
|
82
|
-
`).concat(
|
|
81
|
+
body[`).concat(vn,`] {
|
|
82
|
+
`).concat(J5,": ").concat(l,`px;
|
|
83
83
|
}
|
|
84
|
-
`)},
|
|
84
|
+
`)},cs=function(){var t=parseInt(document.body.getAttribute(vn)||"0",10);return isFinite(t)?t:0},mv=function(){T.useEffect(function(){return document.body.setAttribute(vn,(cs()+1).toString()),function(){var t=cs()-1;t<=0?document.body.removeAttribute(vn):document.body.setAttribute(vn,t.toString())}},[])},yv=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;mv();var o=T.useMemo(function(){return pv(i)},[i]);return T.createElement(gv,{styles:vv(o,!e,i,n?"":"!important")})},Uo=!1;if(typeof window<"u")try{var $r=Object.defineProperty({},"passive",{get:function(){return Uo=!0,!0}});window.addEventListener("test",$r,$r),window.removeEventListener("test",$r,$r)}catch{Uo=!1}var qt=Uo?{passive:!1}:!1,bv=function(t){return t.tagName==="TEXTAREA"},Vd=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!bv(t)&&n[e]==="visible")},Sv=function(t){return Vd(t,"overflowY")},Cv=function(t){return Vd(t,"overflowX")},ds=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Bd(t,r);if(i){var o=Wd(t,r),a=o[1],l=o[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wv=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Ev=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Bd=function(t,e){return t==="v"?Sv(e):Cv(e)},Wd=function(t,e){return t==="v"?wv(e):Ev(e)},$v=function(t,e){return t==="h"&&e==="rtl"?-1:1},xv=function(t,e,n,r,i){var o=$v(t,window.getComputedStyle(e).direction),a=o*r,l=n.target,s=e.contains(l),u=!1,c=a>0,h=0,p=0;do{var g=Wd(t,l),m=g[0],f=g[1],v=g[2],y=f-v-o*m;(m||y)&&Bd(t,l)&&(h+=y,p+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!s&&l!==document.body||s&&(e.contains(l)||e===l));return(c&&Math.abs(h)<1||!c&&Math.abs(p)<1)&&(u=!0),u},xr=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},fs=function(t){return[t.deltaX,t.deltaY]},hs=function(t){return t&&"current"in t?t.current:t},Tv=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Pv=function(t){return`
|
|
85
85
|
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
86
86
|
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
87
|
-
`)},
|
|
87
|
+
`)},Dv=0,Yt=[];function Ov(t){var e=T.useRef([]),n=T.useRef([0,0]),r=T.useRef(),i=T.useState(Dv++)[0],o=T.useState(zd)[0],a=T.useRef(t);T.useEffect(function(){a.current=t},[t]),T.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var f=Ph([t.lockRef.current],(t.shards||[]).map(hs),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=T.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!a.current.allowPinchZoom;var y=xr(f),C=n.current,S="deltaX"in f?f.deltaX:C[0]-y[0],P="deltaY"in f?f.deltaY:C[1]-y[1],x,O=f.target,D=Math.abs(S)>Math.abs(P)?"h":"v";if("touches"in f&&D==="h"&&O.type==="range")return!1;var b=ds(D,O);if(!b)return!0;if(b?x=D:(x=D==="v"?"h":"v",b=ds(D,O)),!b)return!1;if(!r.current&&"changedTouches"in f&&(S||P)&&(r.current=x),!x)return!0;var k=r.current||x;return xv(k,v,f,k==="h"?S:P)},[]),s=T.useCallback(function(f){var v=f;if(!(!Yt.length||Yt[Yt.length-1]!==o)){var y="deltaY"in v?fs(v):xr(v),C=e.current.filter(function(x){return x.name===v.type&&(x.target===v.target||v.target===x.shadowParent)&&Tv(x.delta,y)})[0];if(C&&C.should){v.cancelable&&v.preventDefault();return}if(!C){var S=(a.current.shards||[]).map(hs).filter(Boolean).filter(function(x){return x.contains(v.target)}),P=S.length>0?l(v,S[0]):!a.current.noIsolation;P&&v.cancelable&&v.preventDefault()}}},[]),u=T.useCallback(function(f,v,y,C){var S={name:f,delta:v,target:y,should:C,shadowParent:_v(y)};e.current.push(S),setTimeout(function(){e.current=e.current.filter(function(P){return P!==S})},1)},[]),c=T.useCallback(function(f){n.current=xr(f),r.current=void 0},[]),h=T.useCallback(function(f){u(f.type,fs(f),f.target,l(f,t.lockRef.current))},[]),p=T.useCallback(function(f){u(f.type,xr(f),f.target,l(f,t.lockRef.current))},[]);T.useEffect(function(){return Yt.push(o),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",s,qt),document.addEventListener("touchmove",s,qt),document.addEventListener("touchstart",c,qt),function(){Yt=Yt.filter(function(f){return f!==o}),document.removeEventListener("wheel",s,qt),document.removeEventListener("touchmove",s,qt),document.removeEventListener("touchstart",c,qt)}},[]);var g=t.removeScrollBar,m=t.inert;return T.createElement(T.Fragment,null,m?T.createElement(o,{styles:Pv(i)}):null,g?T.createElement(yv,{gapMode:t.gapMode}):null)}function _v(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Iv=ov(Hd,Ov);var Ud=T.forwardRef(function(t,e){return T.createElement(wi,Ge({},t,{ref:e,sideCar:Iv}))});Ud.classNames=wi.classNames;var kv=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Zt=new WeakMap,Tr=new WeakMap,Pr={},no=0,Gd=function(t){return t&&(t.host||Gd(t.parentNode))},Nv=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Gd(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Rv=function(t,e,n,r){var i=Nv(e,Array.isArray(t)?t:[t]);Pr[n]||(Pr[n]=new WeakMap);var o=Pr[n],a=[],l=new Set,s=new Set(i),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};i.forEach(u);var c=function(h){!h||s.has(h)||Array.prototype.forEach.call(h.children,function(p){if(l.has(p))c(p);else try{var g=p.getAttribute(r),m=g!==null&&g!=="false",f=(Zt.get(p)||0)+1,v=(o.get(p)||0)+1;Zt.set(p,f),o.set(p,v),a.push(p),f===1&&m&&Tr.set(p,!0),v===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return c(e),l.clear(),no++,function(){a.forEach(function(h){var p=Zt.get(h)-1,g=o.get(h)-1;Zt.set(h,p),o.set(h,g),p||(Tr.has(h)||h.removeAttribute(r),Tr.delete(h)),g||h.removeAttribute(n)}),no--,no||(Zt=new WeakMap,Zt=new WeakMap,Tr=new WeakMap,Pr={})}},Lv=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=kv(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Rv(r,i,n,"aria-hidden")):function(){return null}},Oa="Dialog",[qd,Z4]=b5(Oa),[Mv,Be]=qd(Oa),Yd=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,l=T.useRef(null),s=T.useRef(null),[u=!1,c]=E5({prop:r,defaultProp:i,onChange:o});return w.jsx(Mv,{scope:e,triggerRef:l,contentRef:s,contentId:it(),titleId:it(),descriptionId:it(),open:u,onOpenChange:c,onOpenToggle:T.useCallback(()=>c(h=>!h),[c]),modal:a,children:n})};Yd.displayName=Oa;var Zd="DialogTrigger",Av=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Be(Zd,n),o=zt(e,i.triggerRef);return w.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ka(i.open),...r,ref:o,onClick:mt(t.onClick,i.onOpenToggle)})});Av.displayName=Zd;var _a="DialogPortal",[Kv,Xd]=qd(_a,{forceMount:void 0}),Jd=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=Be(_a,e);return w.jsx(Kv,{scope:e,forceMount:n,children:T.Children.map(r,a=>w.jsx(Ci,{present:n||o.open,children:w.jsx(Fd,{asChild:!0,container:i,children:a})}))})};Jd.displayName=_a;var ii="DialogOverlay",Qd=T.forwardRef((t,e)=>{const n=Xd(ii,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=Be(ii,t.__scopeDialog);return o.modal?w.jsx(Ci,{present:r||o.open,children:w.jsx(Fv,{...i,ref:e})}):null});Qd.displayName=ii;var Fv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Be(ii,n);return w.jsx(Ud,{as:Da,allowPinchZoom:!0,shards:[i.contentRef],children:w.jsx(be.div,{"data-state":ka(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),At="DialogContent",ef=T.forwardRef((t,e)=>{const n=Xd(At,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=Be(At,t.__scopeDialog);return w.jsx(Ci,{present:r||o.open,children:o.modal?w.jsx(jv,{...i,ref:e}):w.jsx(Hv,{...i,ref:e})})});ef.displayName=At;var jv=T.forwardRef((t,e)=>{const n=Be(At,t.__scopeDialog),r=T.useRef(null),i=zt(e,n.contentRef,r);return T.useEffect(()=>{const o=r.current;if(o)return Lv(o)},[]),w.jsx(tf,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:mt(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:mt(t.onFocusOutside,o=>o.preventDefault())})}),Hv=T.forwardRef((t,e)=>{const n=Be(At,t.__scopeDialog),r=T.useRef(!1),i=T.useRef(!1);return w.jsx(tf,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=t.onCloseAutoFocus)==null||a.call(t,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var s,u;(s=t.onInteractOutside)==null||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),tf=T.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=t,l=Be(At,n),s=T.useRef(null),u=zt(e,s);return Z5(),w.jsxs(w.Fragment,{children:[w.jsx(Ad,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:w.jsx(Ld,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ka(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(Wv,{titleId:l.titleId}),w.jsx(Gv,{contentRef:s,descriptionId:l.descriptionId})]})]})}),Ia="DialogTitle",zv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Be(Ia,n);return w.jsx(be.h2,{id:i.titleId,...r,ref:e})});zv.displayName=Ia;var nf="DialogDescription",Vv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Be(nf,n);return w.jsx(be.p,{id:i.descriptionId,...r,ref:e})});Vv.displayName=nf;var rf="DialogClose",Bv=T.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Be(rf,n);return w.jsx(be.button,{type:"button",...r,ref:e,onClick:mt(t.onClick,()=>i.onOpenChange(!1))})});Bv.displayName=rf;function ka(t){return t?"open":"closed"}var of="DialogTitleWarning",[X4,af]=y5(of,{contentName:At,titleName:Ia,docsSlug:"dialog"}),Wv=({titleId:t})=>{const e=af(of),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
88
88
|
|
|
89
89
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
90
90
|
|
|
91
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Tb="DialogDescriptionWarning",Db=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tf(Tb).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},Pb=Ud,Ob=qd,Ib=Yd,_b=Xd,Nn='[cmdk-group=""]',ro='[cmdk-group-items=""]',kb='[cmdk-group-heading=""]',Ra='[cmdk-item=""]',hl=`${Ra}:not([aria-disabled="true"])`,Go="cmdk-item-select",wt="data-value",Rb=(t,e,n)=>Jm(t,e,n),nf=C.createContext(void 0),sr=()=>C.useContext(nf),rf=C.createContext(void 0),Na=()=>C.useContext(rf),of=C.createContext(void 0),af=C.forwardRef((t,e)=>{let n=sn(()=>{var M,R;return{search:"",value:(R=(M=t.value)!=null?M:t.defaultValue)!=null?R:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),s=sf(t),{label:l,children:u,value:c,onValueChange:h,filter:p,shouldFilter:g,loop:m,disablePointerSelection:f=!1,vimBindings:v=!0,...y}=t,S=it(),w=it(),P=it(),x=C.useRef(null),O=Wb();Lt(()=>{if(c!==void 0){let M=c.trim();n.current.value=M,D.emit()}},[c]),Lt(()=>{O(6,E)},[]);let D=C.useMemo(()=>({subscribe:M=>(a.current.add(M),()=>a.current.delete(M)),snapshot:()=>n.current,setState:(M,R,K)=>{var L,H,W;if(!Object.is(n.current[M],R)){if(n.current[M]=R,M==="search")z(),B(),O(1,N);else if(M==="value"&&(K||O(5,E),((L=s.current)==null?void 0:L.value)!==void 0)){let F=R??"";(W=(H=s.current).onValueChange)==null||W.call(H,F);return}D.emit()}},emit:()=>{a.current.forEach(M=>M())}}),[]),b=C.useMemo(()=>({value:(M,R,K)=>{var L;R!==((L=o.current.get(M))==null?void 0:L.value)&&(o.current.set(M,{value:R,keywords:K}),n.current.filtered.items.set(M,k(R,K)),O(2,()=>{B(),D.emit()}))},item:(M,R)=>(r.current.add(M),R&&(i.current.has(R)?i.current.get(R).add(M):i.current.set(R,new Set([M]))),O(3,()=>{z(),B(),n.current.value||N(),D.emit()}),()=>{o.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let K=_();O(4,()=>{z(),(K==null?void 0:K.getAttribute("id"))===M&&N(),D.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>s.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:S,inputId:P,labelId:w,listInnerRef:x}),[]);function k(M,R){var K,L;let H=(L=(K=s.current)==null?void 0:K.filter)!=null?L:Rb;return M?H(M,n.current.search,R):0}function B(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(L=>{let H=i.current.get(L),W=0;H.forEach(F=>{let J=M.get(F);W=Math.max(J,W)}),R.push([L,W])});let K=x.current;j().sort((L,H)=>{var W,F;let J=L.getAttribute("id"),te=H.getAttribute("id");return((W=M.get(te))!=null?W:0)-((F=M.get(J))!=null?F:0)}).forEach(L=>{let H=L.closest(ro);H?H.appendChild(L.parentElement===H?L:L.closest(`${ro} > *`)):K.appendChild(L.parentElement===K?L:L.closest(`${ro} > *`))}),R.sort((L,H)=>H[1]-L[1]).forEach(L=>{var H;let W=(H=x.current)==null?void 0:H.querySelector(`${Nn}[${wt}="${encodeURIComponent(L[0])}"]`);W==null||W.parentElement.appendChild(W)})}function N(){let M=j().find(K=>K.getAttribute("aria-disabled")!=="true"),R=M==null?void 0:M.getAttribute(wt);D.setState("value",R||void 0)}function z(){var M,R,K,L;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let H=0;for(let W of r.current){let F=(R=(M=o.current.get(W))==null?void 0:M.value)!=null?R:"",J=(L=(K=o.current.get(W))==null?void 0:K.keywords)!=null?L:[],te=k(F,J);n.current.filtered.items.set(W,te),te>0&&H++}for(let[W,F]of i.current)for(let J of F)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=H}function E(){var M,R,K;let L=_();L&&(((M=L.parentElement)==null?void 0:M.firstChild)===L&&((K=(R=L.closest(Nn))==null?void 0:R.querySelector(kb))==null||K.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function _(){var M;return(M=x.current)==null?void 0:M.querySelector(`${Ra}[aria-selected="true"]`)}function j(){var M;return Array.from(((M=x.current)==null?void 0:M.querySelectorAll(hl))||[])}function U(M){let R=j()[M];R&&D.setState("value",R.getAttribute(wt))}function X(M){var R;let K=_(),L=j(),H=L.findIndex(F=>F===K),W=L[H+M];(R=s.current)!=null&&R.loop&&(W=H+M<0?L[L.length-1]:H+M===L.length?L[0]:L[H+M]),W&&D.setState("value",W.getAttribute(wt))}function I(M){let R=_(),K=R==null?void 0:R.closest(Nn),L;for(;K&&!L;)K=M>0?Hb(K,Nn):Bb(K,Nn),L=K==null?void 0:K.querySelector(hl);L?D.setState("value",L.getAttribute(wt)):X(M)}let A=()=>U(j().length-1),G=M=>{M.preventDefault(),M.metaKey?A():M.altKey?I(1):X(1)},Y=M=>{M.preventDefault(),M.metaKey?U(0):M.altKey?I(-1):X(-1)};return C.createElement(be.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:M=>{var R;if((R=y.onKeyDown)==null||R.call(y,M),!M.defaultPrevented)switch(M.key){case"n":case"j":{v&&M.ctrlKey&&G(M);break}case"ArrowDown":{G(M);break}case"p":case"k":{v&&M.ctrlKey&&Y(M);break}case"ArrowUp":{Y(M);break}case"Home":{M.preventDefault(),U(0);break}case"End":{M.preventDefault(),A();break}case"Enter":if(!M.nativeEvent.isComposing&&M.keyCode!==229){M.preventDefault();let K=_();if(K){let L=new Event(Go);K.dispatchEvent(L)}}}}},C.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:Vb},l),$i(t,M=>C.createElement(rf.Provider,{value:D},C.createElement(nf.Provider,{value:b},M))))}),Nb=C.forwardRef((t,e)=>{var n,r;let i=it(),o=C.useRef(null),a=C.useContext(of),s=sr(),l=sf(t),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Lt(()=>{if(!u)return s.item(i,a==null?void 0:a.id)},[u]);let c=lf(i,o,[t.value,t.children,o],t.keywords),h=Na(),p=Kt(O=>O.value&&O.value===c.current),g=Kt(O=>u||s.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);C.useEffect(()=>{let O=o.current;if(!(!O||t.disabled))return O.addEventListener(Go,m),()=>O.removeEventListener(Go,m)},[g,t.onSelect,t.disabled]);function m(){var O,D;f(),(D=(O=l.current).onSelect)==null||D.call(O,c.current)}function f(){h.setState("value",c.current,!0)}if(!g)return null;let{disabled:v,value:y,onSelect:S,forceMount:w,keywords:P,...x}=t;return C.createElement(be.div,{ref:Zn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:f,onClick:v?void 0:m},t.children)}),Mb=C.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),s=C.useRef(null),l=C.useRef(null),u=it(),c=sr(),h=Kt(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Lt(()=>c.group(a),[]),lf(a,s,[t.value,t.heading,l]);let p=C.useMemo(()=>({id:a,forceMount:i}),[i]);return C.createElement(be.div,{ref:Zn([s,e]),...o,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&C.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$i(t,g=>C.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},C.createElement(of.Provider,{value:p},g))))}),Ab=C.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=C.useRef(null),o=Kt(a=>!a.search);return!n&&!o?null:C.createElement(be.div,{ref:Zn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),Lb=C.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Na(),a=Kt(c=>c.search),s=Kt(c=>c.value),l=sr(),u=C.useMemo(()=>{var c;let h=(c=l.listInnerRef.current)==null?void 0:c.querySelector(`${Ra}[${wt}="${encodeURIComponent(s)}"]`);return h==null?void 0:h.getAttribute("id")},[]);return C.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),C.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":u,id:l.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),Kb=C.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=C.useRef(null),a=C.useRef(null),s=sr();return C.useEffect(()=>{if(a.current&&o.current){let l=a.current,u=o.current,c,h=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(c),h.unobserve(l)}}},[]),C.createElement(be.div,{ref:Zn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},$i(t,l=>C.createElement("div",{ref:Zn([a,s.listInnerRef]),"cmdk-list-sizer":""},l)))}),Fb=C.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=t;return C.createElement(Pb,{open:n,onOpenChange:r},C.createElement(Ob,{container:a},C.createElement(Ib,{"cmdk-overlay":"",className:i}),C.createElement(_b,{"aria-label":t.label,"cmdk-dialog":"",className:o},C.createElement(af,{ref:e,...s}))))}),jb=C.forwardRef((t,e)=>Kt(n=>n.filtered.count===0)?C.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),zb=C.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return C.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$i(t,a=>C.createElement("div",{"aria-hidden":!0},a)))}),Qn=Object.assign(af,{List:Kb,Item:Nb,Input:Lb,Group:Mb,Separator:Ab,Dialog:Fb,Empty:jb,Loading:zb});function Hb(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Bb(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function sf(t){let e=C.useRef(t);return Lt(()=>{e.current=t}),e}var Lt=typeof window>"u"?C.useEffect:C.useLayoutEffect;function sn(t){let e=C.useRef();return e.current===void 0&&(e.current=t()),e}function Zn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Kt(t){let e=Na(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function lf(t,e,n,r=[]){let i=C.useRef(),o=sr();return Lt(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());o.value(t,s,l),(a=e.current)==null||a.setAttribute(wt,s),i.current=s}),i}var Wb=()=>{let[t,e]=C.useState(),n=sn(()=>new Map);return Lt(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function Ub(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function $i({asChild:t,children:e},n){return t&&C.isValidElement(e)?C.cloneElement(Ub(e),{ref:e.ref},n(e.props.children)):n(e)}var Vb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>T.jsx("div",{className:ot("c__horizontal-separator",{"with-padding":t})}),uf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=mn.useCunningham();return i?T.jsxs(T.Fragment,{children:[i,o&&T.jsx(qo,{})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"quick-search-input-container",children:[!t&&T.jsx("span",{className:"material-icons",children:"search"}),t&&T.jsx("div",{children:T.jsx(Da,{size:"sm"})}),T.jsx(Qn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:s=>{s.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&T.jsx(qo,{withPadding:!1})]})},Gb=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},qb=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:s})=>{const l=d.useRef(null);return T.jsx(T.Fragment,{children:T.jsx("div",{className:"quick-search-container",children:T.jsxs(Qn,{label:o,shouldFilter:!1,ref:l,children:[i&&T.jsx(uf,{loading:r,withSeparator:Gb(s),inputValue:n,onFilter:t,placeholder:a,children:e}),T.jsx(Qn.List,{children:T.jsx("div",{children:s})})]})})})},Mr=({children:t,onSelect:e,id:n})=>T.jsx(Qn.Item,{value:n,onSelect:e,children:t}),Yb=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:T.jsx("div",{className:"pt-base",children:T.jsxs(Qn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>T.jsx(Mr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>T.jsx(Mr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>T.jsx(Mr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&T.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},Xb=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=ar();return T.jsxs("div",{className:"c__quick-search-item-template",children:[T.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&T.jsx("div",{className:ot("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},Jb=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:T.jsx("div",{className:ot("c__tabs",{"c__tabs__full-width":n}),children:T.jsxs(rm,{defaultSelectedKey:e,children:[T.jsx(om,{"aria-label":"History of Ancient Rome",children:t.map(r=>T.jsxs(sm,{id:r.id,children:[r.icon&&T.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>T.jsx(lm,{id:r.id,children:r.content},r.id))]})}),cf=d.createContext(null);function Oe(){const t=d.useContext(cf);if(t===null)throw new Error("No Tree Api Provided");return t}const df=d.createContext(null);function Qb(){const t=d.useContext(df);if(t===null)throw new Error("Provide a NodesContext");return t}const ff=d.createContext(null);function Zb(){const t=d.useContext(ff);if(t===null)throw new Error("Provide a DnDContext");return t}const hf=d.createContext(0);function pf(){d.useContext(hf)}function Ar(t,e,n){return Math.max(Math.min(t,n),e)}function gf(t){return t&&t.isLeaf}function vf(t){return t&&t.isInternal&&!t.isOpen}function mf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const yf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},bf=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function eS(){}function Ma(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Ma(n,e);if(r)return r}return null}function oi(t,e){if(e(t),t.children)for(let n of t.children)oi(n,e)}function Sf(t){const e=Ef(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=tS(e,r);break}n==null||n.focus()}function wf(t){const e=Ef(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=nS(e,r);break}n==null||n.focus()}function tS(t,e){return e+1<t.length?t[e+1]:t[0]}function nS(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Ef(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function zn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function $f(t){return t===null?null:Et(t)}function Et(t){return typeof t=="string"?t:t.id}function rS(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function xf(t,...e){if(t)return t(...e)}function Cf(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function Tf(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function Df(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const iS=Object.freeze(Object.defineProperty({__proto__:null,access:zn,bound:Ar,dfs:Ma,focusNextElement:Sf,focusPrevElement:wf,getInsertIndex:Tf,getInsertParentId:Df,identify:Et,identifyNull:$f,indexOf:bf,isClosed:vf,isDescendant:yf,isItem:gf,isOpenWithEmptyChildren:mf,mergeRefs:rS,noop:eS,safeRun:xf,waitFor:Cf,walk:oi},Symbol.toStringTag,{value:"Module"})),oS={display:"flex",alignItems:"center",zIndex:1},aS={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},sS={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},lS=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return T.jsxs("div",{style:Object.assign(Object.assign({},oS),i),children:[T.jsx("div",{style:Object.assign({},sS)}),T.jsx("div",{style:Object.assign({},aS)})]})});function uS({node:t,attrs:e,innerRef:n,children:r}){return T.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function cS(t){return T.jsxs("div",{ref:t.dragHandle,style:t.style,children:[T.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?T.jsx(fS,Object.assign({},t)):T.jsx(dS,Object.assign({},t))]})}function dS(t){return T.jsx(T.Fragment,{children:T.jsx("span",{children:t.node.data.name})})}function fS({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),T.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function hS(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function pS(){return{type:"TREE_BLUR"}}function gS(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class ai{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new ai(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function pl(t){var e;function n(o,a,s){const l=t.accessId(o),u=new ai({tree:t,data:o,level:a,parent:s,id:l,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(h=>n(h,a+1,u))),u}const r=new ai({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function gl(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function vS(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:gl(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:gl(t.unfiltered,e)}):t}const wn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:Et(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(Et)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(Et)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:Et(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:Et(t)})};function mS(t=wn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const En={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function yS(t=wn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return wn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const bS={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},SS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},wS=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function Pf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return T.jsxs(ES,{isDragging:i,children:[T.jsx($S,{offset:t,children:T.jsx(CS,{id:n,dragIds:r})}),T.jsx(xS,{mouse:e,count:r.length})]})}const ES=d.memo(function(e){return e.isDragging?T.jsx("div",{style:bS,children:e.children}):null});function $S(t){return T.jsx("div",{className:"row preview",style:SS(t.offset),children:t.children})}function xS(t){const{count:e,mouse:n}=t;return e>1?T.jsx("div",{className:"selected-count",style:wS(n),children:e}):null}const CS=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?T.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xo.apply(null,arguments)}function vl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(t,e)}function TS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jo(t,e)}var ml=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function DS(t,e){return!!(t===e||ml(t)&&ml(e))}function PS(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!DS(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=PS);var n,r=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&e(s,r)||(i=t.apply(this,s),o=!0,n=this,r=s),i}return a}var OS=typeof performance=="object"&&typeof performance.now=="function",yl=OS?function(){return performance.now()}:function(){return Date.now()};function bl(t){cancelAnimationFrame(t.id)}function IS(t,e){var n=yl();function r(){yl()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function Sl(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function wl(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var _S=150,kS=function(e,n){return e},Lr=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Lr=new WeakSet,Kr=new WeakSet);function RS(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(h){TS(p,h);function p(m){var f;return f=h.call(this,m)||this,f._instanceProps=l(f.props,vl(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:vl(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,y,S,w){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:y,visibleStartIndex:S,visibleStopIndex:w})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,y,S){return f.props.onScroll({scrollDirection:v,scrollOffset:y,scrollUpdateWasRequested:S})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var y=f.props,S=y.direction,w=y.itemSize,P=y.layout,x=f._getItemStyleCache(u&&w,u&&P,u&&S),O;if(x.hasOwnProperty(v))O=x[v];else{var D=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=S==="horizontal"||P==="horizontal",B=S==="rtl",N=k?D:0;x[v]=O={position:"absolute",left:B?void 0:N,right:B?N:void 0,top:k?0:D,height:k?"100%":b,width:k?b:"100%"}}return O},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,y,S){return{}}),f._onScrollHorizontal=function(v){var y=v.currentTarget,S=y.clientWidth,w=y.scrollLeft,P=y.scrollWidth;f.setState(function(x){if(x.scrollOffset===w)return null;var O=f.props.direction,D=w;if(O==="rtl")switch(wl()){case"negative":D=-w;break;case"positive-descending":D=P-S-w;break}return D=Math.max(0,Math.min(D,P-S)),{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var y=v.currentTarget,S=y.clientHeight,w=y.scrollHeight,P=y.scrollTop;f.setState(function(x){if(x.scrollOffset===P)return null;var O=Math.max(0,Math.min(P,w-S));return{isScrolling:!0,scrollDirection:x.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var y=f.props.outerRef;f._outerRef=v,typeof y=="function"?y(v):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&bl(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=IS(f._resetIsScrolling,_S)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}p.getDerivedStateFromProps=function(f,v){return NS(f,v),c(f),null};var g=p.prototype;return g.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(f,v){v===void 0&&(v="auto");var y=this.props,S=y.itemCount,w=y.layout,P=this.state.scrollOffset;f=Math.max(0,Math.min(f,S-1));var x=0;if(this._outerRef){var O=this._outerRef;w==="vertical"?x=O.scrollWidth>O.clientWidth?Sl():0:x=O.scrollHeight>O.clientHeight?Sl():0}this.scrollTo(o(this.props,f,v,P,this._instanceProps,x))},g.componentDidMount=function(){var f=this.props,v=f.direction,y=f.initialScrollOffset,S=f.layout;if(typeof y=="number"&&this._outerRef!=null){var w=this._outerRef;v==="horizontal"||S==="horizontal"?w.scrollLeft=y:w.scrollTop=y}this._callPropsCallbacks()},g.componentDidUpdate=function(){var f=this.props,v=f.direction,y=f.layout,S=this.state,w=S.scrollOffset,P=S.scrollUpdateWasRequested;if(P&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||y==="horizontal")if(v==="rtl")switch(wl()){case"negative":x.scrollLeft=-w;break;case"positive-ascending":x.scrollLeft=w;break;default:var O=x.clientWidth,D=x.scrollWidth;x.scrollLeft=D-O-w;break}else x.scrollLeft=w;else x.scrollTop=w}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&bl(this._resetIsScrollingTimeoutId)},g.render=function(){var f=this.props,v=f.children,y=f.className,S=f.direction,w=f.height,P=f.innerRef,x=f.innerElementType,O=f.innerTagName,D=f.itemCount,b=f.itemData,k=f.itemKey,B=k===void 0?kS:k,N=f.layout,z=f.outerElementType,E=f.outerTagName,_=f.style,j=f.useIsScrolling,U=f.width,X=this.state.isScrolling,I=S==="horizontal"||N==="horizontal",A=I?this._onScrollHorizontal:this._onScrollVertical,G=this._getRangeToRender(),Y=G[0],M=G[1],R=[];if(D>0)for(var K=Y;K<=M;K++)R.push(d.createElement(v,{data:b,key:B(K,b),index:K,isScrolling:j?X:void 0,style:this._getItemStyle(K)}));var L=r(this.props,this._instanceProps);return d.createElement(z||E||"div",{className:y,onScroll:A,ref:this._outerRefSetter,style:Xo({position:"relative",height:w,width:U,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},_)},d.createElement(x||O||"div",{children:R,ref:P,style:{height:I?"100%":L,pointerEvents:X?"none":void 0,width:I?L:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),y=v[0],S=v[1],w=v[2],P=v[3];this._callOnItemsRendered(y,S,w,P)}}if(typeof this.props.onScroll=="function"){var x=this.state,O=x.scrollDirection,D=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(O,D,b)}},g._getRangeToRender=function(){var f=this.props,v=f.itemCount,y=f.overscanCount,S=this.state,w=S.isScrolling,P=S.scrollDirection,x=S.scrollOffset;if(v===0)return[0,0,0,0];var O=a(this.props,x,this._instanceProps),D=s(this.props,O,x,this._instanceProps),b=!w||P==="backward"?Math.max(1,y):1,k=!w||P==="forward"?Math.max(1,y):1;return[Math.max(0,O-b),Math.max(0,Math.min(v-1,D+k)),O,D]},p}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var NS=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,s=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(s!=null||l!=null)&&Kr&&!Kr.has(c)&&(Kr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Lr&&!Lr.has(c)&&(Lr.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!h&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},MS=RS({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var s=e.direction,l=e.height,u=e.itemCount,c=e.itemSize,h=e.layout,p=e.width,g=s==="horizontal"||h==="horizontal",m=g?p:l,f=Math.max(0,u*c-m),v=Math.min(f,n*c),y=Math.max(0,n*c-m+c+a);switch(r==="smart"&&(i>=y-m&&i<=v+m?r="auto":r="center"),r){case"start":return v;case"end":return y;case"center":{var S=Math.round(y+(v-y)/2);return S<Math.ceil(m/2)?0:S>f+Math.floor(m/2)?f:S}case"auto":default:return i>=y&&i<=v?i:i<y?y:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,u=e.width,c=i==="horizontal"||l==="horizontal",h=n*s,p=c?u:o,g=Math.ceil((p+r-h)/s);return Math.max(0,Math.min(a-1,n+g-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function AS(){var t,e;const n=Oe(),i=Zb().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),s=o*i.level,l=n.renderCursor;return T.jsx(l,{top:a,left:s,indent:o})}var LS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const KS=d.forwardRef(function(e,n){const{children:r}=e,i=LS(e,["children"]),o=Oe();return T.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[T.jsx(FS,{}),r]}))}),FS=()=>{const t=Oe();return T.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:T.jsx(AS,{})})};var jS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const zS=d.forwardRef(function(e,n){var r,i,o,a,{style:s}=e,l=jS(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,h=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return T.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+h}px`})},l))});var Of=d.createContext({dragDropManager:void 0}),Me;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Me||(Me={}));function Q(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Aa="dnd-core/INIT_COORDS",xi="dnd-core/BEGIN_DRAG",La="dnd-core/PUBLISH_DRAG_SOURCE",Ci="dnd-core/HOVER",Ti="dnd-core/DROP",Di="dnd-core/END_DRAG";function El(t,e){return{type:Aa,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function HS(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function BS(t,e){return t.filter(function(n){return n!==e})}function If(t){return Fr(t)==="object"}function WS(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function US(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var VS={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function GS(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,s=r.getSourceClientOffset,l=t.getMonitor(),u=t.getRegistry();t.dispatch(El(a)),qS(n,l,u);var c=JS(n,l);if(c===null){t.dispatch(VS);return}var h=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");YS(s),h=s(c)}t.dispatch(El(a,h));var p=u.getSource(c),g=p.beginDrag(l,c);if(g!=null){XS(g),u.pinSource(c);var m=u.getSourceType(c);return{type:xi,payload:{itemType:m,item:g,sourceId:c,clientOffset:a||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}}function qS(t,e,n){Q(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){Q(n.getSource(r),"Expected sourceIds to be registered.")})}function YS(t){Q(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function XS(t){Q(If(t),"Item must be an object.")}function JS(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function QS(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:La}}}function Qo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function ZS(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;ew(n);var o=n.slice(0),a=t.getMonitor(),s=t.getRegistry();tw(o,a,s);var l=a.getItemType();return nw(o,s,l),rw(o,a,s),{type:Ci,payload:{targetIds:o,clientOffset:i||null}}}}function ew(t){Q(Array.isArray(t),"Expected targetIds to be an array.")}function tw(t,e,n){Q(e.isDragging(),"Cannot call hover while not dragging."),Q(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];Q(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);Q(o,"Expected targetIds to be registered.")}}function nw(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Qo(o,n)||t.splice(r,1)}}function rw(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function $l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(n),!0).forEach(function(r){iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ow(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();aw(r);var o=uw(r);o.forEach(function(a,s){var l=sw(a,s,i,r),u={type:Ti,payload:{dropResult:xl(xl({},n),l)}};t.dispatch(u)})}}function aw(t){Q(t.isDragging(),"Cannot call drop while not dragging."),Q(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function sw(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return lw(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function lw(t){Q(typeof t>"u"||If(t),"Drop result must either be an object or undefined.")}function uw(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function cw(t){return function(){var n=t.getMonitor(),r=t.getRegistry();dw(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Di}}}function dw(t){Q(t.isDragging(),"Cannot call endDrag while not dragging.")}function fw(t){return{beginDrag:GS(t),publishDragSource:QS(t),hover:ZS(t),drop:ow(t),endDrag:cw(t)}}function hw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gw(t,e,n){return pw(t.prototype,e),t}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vw=function(){function t(e,n){var r=this;hw(this,t),Mn(this,"store",void 0),Mn(this,"monitor",void 0),Mn(this,"backend",void 0),Mn(this,"isSetUp",!1),Mn(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return gw(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.apply(n,l);typeof c<"u"&&r(c)}}var o=fw(this);return Object.keys(o).reduce(function(a,s){var l=o[s];return a[s]=i(l),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function _e(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Cl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),so=function(){return Math.random().toString(36).substring(7).split("").join(".")},Tl={INIT:"@@redux/INIT"+so(),REPLACE:"@@redux/REPLACE"+so(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+so()}};function mw(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function yw(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(ww(t))return"date";if(Sw(t))return"error";var n=bw(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function bw(t){return typeof t.constructor=="function"?t.constructor.name:null}function Sw(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function ww(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=yw(t)),e}function _f(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_e(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_e(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(_f)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_e(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_e(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return u(),s.push(f),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?_e(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u();var S=s.indexOf(f);s.splice(S,1),a=null}}}function p(f){if(!mw(f))throw new Error(process.env.NODE_ENV==="production"?_e(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof f.type>"u")throw new Error(process.env.NODE_ENV==="production"?_e(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_e(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,f)}finally{l=!1}for(var v=a=s,y=0;y<v.length;y++){var S=v[y];S()}return f}function g(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?_e(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,p({type:Tl.REPLACE})}function m(){var f,v=h;return f={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?_e(11):"Expected the observer to be an object. Instead, received: '"+Qt(S)+"'");function w(){S.next&&S.next(c())}w();var P=v(w);return{unsubscribe:P}}},f[Cl]=function(){return this},f}return p({type:Tl.INIT}),r={dispatch:p,subscribe:h,getState:c,replaceReducer:g},r[Cl]=m,r}var Ew=function(e,n){return e===n};function $w(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function xw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ew;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Dl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dl(Object(n),!0).forEach(function(r){Cw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ol={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Tw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ol,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Aa:case xi:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Ci:return $w(t.clientOffset,n.clientOffset)?t:Pl(Pl({},t),{},{clientOffset:n.clientOffset});case Di:case Ti:return Ol;default:return t}}var Ka="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Pi="dnd-core/REMOVE_TARGET";function Dw(t){return{type:Ka,payload:{sourceId:t}}}function Pw(t){return{type:Fa,payload:{targetId:t}}}function Ow(t){return{type:ja,payload:{sourceId:t}}}function Iw(t){return{type:Pi,payload:{targetId:t}}}function Il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Il(Object(n),!0).forEach(function(r){_w(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Rw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kw,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case xi:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case La:return ke(ke({},t),{},{isSourcePublic:!0});case Ci:return ke(ke({},t),{},{targetIds:n.targetIds});case Pi:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:BS(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Di:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Nw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ka:case Fa:return t+1;case ja:case Pi:return t-1;default:return t}}var si=[],za=[];si.__IS_NONE__=!0;za.__IS_ALL__=!0;function Mw(t,e){if(t===si)return!1;if(t===za||typeof e>"u")return!0;var n=US(e,t);return n.length>0}function Aw(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ci:break;case Ka:case Fa:case Pi:case ja:return si;case xi:case La:case Di:case Ti:default:return za}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=WS(r,o),s=a.length>0||!xw(r,o);if(!s)return si;var l=o[o.length-1],u=r[r.length-1];return l!==u&&(l&&a.push(l),u&&a.push(u)),a}function Lw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function _l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(n),!0).forEach(function(r){Kw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Aw(t.dirtyHandlerIds,{type:e.type,payload:kl(kl({},e.payload),{},{prevTargetIds:HS(t,"dragOperation.targetIds",[])})}),dragOffset:Tw(t.dragOffset,e),refCount:Nw(t.refCount,e),dragOperation:Rw(t.dragOperation,e),stateId:Lw(t.stateId)}}function jw(t,e){return{x:t.x+e.x,y:t.y+e.y}}function kf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function zw(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:kf(jw(e,r),n)}function Hw(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:kf(e,n)}function Bw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ww(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uw(t,e,n){return Ww(t.prototype,e),t}function Rl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vw=function(){function t(e,n){Bw(this,t),Rl(this,"store",void 0),Rl(this,"registry",void 0),this.store=e,this.registry=n}return Uw(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;Q(typeof n=="function","listener must be a function."),Q(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,s=function(){var u=r.store.getState(),c=u.stateId;try{var h=c===a||c===a+1&&!Mw(u.dirtyHandlerIds,o);h||n()}finally{a=c}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;Q(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var s=r.store.getState().dragOffset;s!==i&&(i=s,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return Q(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(Q(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Qo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(Q(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Qo(o,a))return!1;var s=this.getTargetIds();if(!s.length)return!1;var l=s.indexOf(n);return i?l===s.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return zw(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Hw(this.store.getState().dragOffset)}}]),t}(),Gw=0;function qw(){return Gw++}function jr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jr=function(n){return typeof n}:jr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jr(t)}function Yw(t){Q(typeof t.canDrag=="function","Expected canDrag to be a function."),Q(typeof t.beginDrag=="function","Expected beginDrag to be a function."),Q(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Xw(t){Q(typeof t.canDrop=="function","Expected canDrop to be a function."),Q(typeof t.hover=="function","Expected hover to be a function."),Q(typeof t.drop=="function","Expected beginDrag to be a function.")}function Zo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Zo(n,!1)});return}Q(typeof t=="string"||jr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const Nl=typeof global<"u"?global:self,Rf=Nl.MutationObserver||Nl.WebKitMutationObserver;function Nf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Jw(t){let e=1;const n=new Rf(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Qw=typeof Rf=="function"?Jw:Nf;class Zw{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Qw(this.flush),this.requestErrorThrow=Nf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class e0{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class t0{create(e){const n=this.freeTasks,r=n.length?n.pop():new e0(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mf=new Zw,n0=new t0(Mf.registerPendingError);function r0(t){Mf.enqueueTask(n0.create(t))}function i0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a0(t,e,n){return o0(t.prototype,e),t}function Zt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s0(t,e){return d0(t)||c0(t,e)||u0(t,e)||l0()}function l0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b0(t,e){if(t){if(typeof t=="string")return Kl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kl(t,e)}}function Kl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function S0(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function w0(t){if(Array.isArray(t))return t}function E0(t,e){if(t==null)return{};var n=$0(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $0(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Fl=0,zr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),x0=d.memo(function(e){var n=e.children,r=E0(e,v0),i=C0(r),o=m0(i,2),a=o[0],s=o[1];return d.useEffect(function(){if(s){var l=Af();return++Fl,function(){--Fl===0&&(l[zr]=null)}}},[]),T.jsx(Of.Provider,Object.assign({value:a},{children:n}),void 0)});function C0(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=T0(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function T0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Af(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[zr]||(i[zr]={dragDropManager:p0(t,e,n,r)}),i[zr]}function Af(){return typeof global<"u"?global:window}function D0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O0(t,e,n){return P0(t.prototype,e),t}function jl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lo=!1,uo=!1,I0=function(){function t(e){D0(this,t),jl(this,"internalMonitor",void 0),jl(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return O0(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Q(!lo,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return lo=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lo=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Q(!uo,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function _0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R0(t,e,n){return k0(t.prototype,e),t}function zl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,N0=function(){function t(e){_0(this,t),zl(this,"internalMonitor",void 0),zl(this,"targetId",null),this.internalMonitor=e.getMonitor()}return R0(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Q(!co,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function M0(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function A0(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;M0(i);var o=n?function(a){return t(a,n)}:t;return L0(i,o)}}function Lf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=A0(r);e[n]=function(){return i}}}),e}function Hl(t,e){typeof t=="function"?t(e):t.current=e}function L0(t,e){var n=t.ref;return Q(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?d.cloneElement(t,{ref:function(i){Hl(n,i),Hl(e,i)}}):d.cloneElement(t,{ref:e})}function Hr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hr=function(n){return typeof n}:Hr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hr(t)}function ea(t){return t!==null&&Hr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=t[u],h=e[u];if(i=void 0,i===!1||i===void 0&&c!==h)return!1}return!0}function K0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j0(t,e,n){return F0(t.prototype,e),t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var z0=function(){function t(e){var n=this;K0(this,t),we(this,"hooks",Lf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),we(this,"handlerId",null),we(this,"dragSourceRef",null),we(this,"dragSourceNode",void 0),we(this,"dragSourceOptionsInternal",null),we(this,"dragSourceUnsubscribe",void 0),we(this,"dragPreviewRef",null),we(this,"dragPreviewNode",void 0),we(this,"dragPreviewOptionsInternal",null),we(this,"dragPreviewUnsubscribe",void 0),we(this,"lastConnectedHandlerId",null),we(this,"lastConnectedDragSource",null),we(this,"lastConnectedDragSourceOptions",null),we(this,"lastConnectedDragPreview",null),we(this,"lastConnectedDragPreviewOptions",null),we(this,"backend",void 0),this.backend=e}return j0(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function H0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W0(t,e,n){return B0(t.prototype,e),t}function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var U0=function(){function t(e){var n=this;H0(this,t),Ve(this,"hooks",Lf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ve(this,"handlerId",null),Ve(this,"dropTargetRef",null),Ve(this,"dropTargetNode",void 0),Ve(this,"dropTargetOptionsInternal",null),Ve(this,"unsubscribeDropTarget",void 0),Ve(this,"lastConnectedHandlerId",null),Ve(this,"lastConnectedDropTarget",null),Ve(this,"lastConnectedDropTargetOptions",null),Ve(this,"backend",void 0),this.backend=e}return W0(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function V0(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function G0(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Ft=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Br(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Br=function(n){return typeof n}:Br=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Br(t)}function q0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function X0(t,e,n){return Y0(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var J0=function(){function t(e,n,r){q0(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return X0(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Br(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function Q0(t,e,n){var r=d.useMemo(function(){return new J0(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Ht(){var t=d.useContext(Of),e=t.dragDropManager;return Q(e!=null,"Expected drag drop context"),e}function Z0(t){return d.useMemo(function(){var e=t.type;return Q(e!=null,"spec.type must be defined"),e},[t])}function eE(t,e){return iE(t)||rE(t,e)||nE(t,e)||tE()}function tE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
97
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
98
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
99
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
100
|
-
`)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Or(en,Gf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),en);function d$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h$(t,e,n){return f$(t.prototype,e),t}function Zl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p$=function(){function t(e){d$(this,t),Zl(this,"item",void 0),Zl(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return h$(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function g$(t,e){var n=new p$(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y$(t,e,n){return m$(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b$=function(){function t(e,n){v$(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return y$(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function S$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function E$(t,e,n){return w$(t.prototype,e),t}function ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $$=function(){function t(e,n,r){var i=this;S$(this,t),ne(this,"options",void 0),ne(this,"actions",void 0),ne(this,"monitor",void 0),ne(this,"registry",void 0),ne(this,"enterLeaveCounter",void 0),ne(this,"sourcePreviewNodes",new Map),ne(this,"sourcePreviewNodeOptions",new Map),ne(this,"sourceNodes",new Map),ne(this,"sourceNodeOptions",new Map),ne(this,"dragStartSourceIds",null),ne(this,"dropTargetIds",[]),ne(this,"dragEnterTargetIds",[]),ne(this,"currentNativeSource",null),ne(this,"currentNativeHandle",null),ne(this,"currentDragSourceNode",null),ne(this,"altKeyPressed",!1),ne(this,"mouseMoveTimeoutTimer",null),ne(this,"asyncEndDragFrameId",null),ne(this,"dragOverTargetIds",null),ne(this,"lastClientOffset",null),ne(this,"hoverRafId",null),ne(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&Wf(a)||null}),ne(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),ne(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),ne(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),ne(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var s=Pr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:s});var l=o.dataTransfer,u=go(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var c=i.monitor.getSourceId(),h=i.sourceNodes.get(c),p=i.sourcePreviewNodes.get(c)||h;if(p){var g=i.getCurrentSourcePreviewNodeOptions(),m=g.anchorX,f=g.anchorY,v=g.offsetX,y=g.offsetY,S={anchorX:m,anchorY:f},w={offsetX:v,offsetY:y},P=c$(h,p,s,S,w);l.setDragImage(p,P.x,P.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),O=x.captureDraggingState;O?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(l&&!l.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),ne(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var s=o.dataTransfer,l=go(s);l&&i.beginDragNativeItem(l,s)}}),ne(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Pr(o)});var s=a.some(function(l){return i.monitor.canDropOnTarget(l)});s&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Pr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var s=(a||[]).some(function(l){return i.monitor.canDropOnTarget(l)});s?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),ne(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Pr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new b$(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new n$(this.isNodeInDocument)}return E$(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},s=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",s),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},s=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",s),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return tu({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return tu({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Ql).some(function(r){return Ql[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=g$(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Ir;function x$(){return Ir||(Ir=new Image,Ir.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Ir}var C$=function(e,n,r){return new $$(e,n,r)};function T$(t){const e=Oe(),n=e.selectedIds,[r,i,o]=OE(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(En.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(En.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(x$())},[o]),i}function D$(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,s=!a,l=o/4,u=i>l&&i<o-l;return{x:r,inTopHalf:a,inBottomHalf:s,inMiddle:u,atTop:!u&&a,atBottom:!u&&s}}function P$(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function _r(t,e){return{parentId:t||null,index:e}}function tn(t,e){return{type:"line",index:t,level:e}}function O$(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=bf(r)+1;return{parentId:i,index:o}}function Yf(t){var e;const n=D$(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:s}=t,[l,u]=P$(o,s,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:_r(o.id,null),cursor:O$(o.id)};if(!l)return{drop:_r((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:tn(0,0)};if(gf(l)){const c=Ar(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(vf(l)){const c=Ar(i,(u==null?void 0:u.level)||0,l.level);return{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}if(mf(l)){const c=Ar(i,0,l.level+1);return c>l.level?{drop:_r(l.id,0),cursor:tn(l.rowIndex+1,c)}:{drop:mo(l,c),cursor:tn(l.rowIndex+1,c)}}return{drop:_r(l==null?void 0:l.id,0),cursor:tn(l.rowIndex+1,l.level+1)}}function I$(t,e){const n=Oe(),[r,i]=zf(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const s=a.getClientOffset();if(!t.current||!s)return;const{cursor:l,drop:u}=Yf({element:t.current,offset:s,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(En.hovering(u.parentId,u.index)),a.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:s,index:l,dragIds:u}=n.state.dnd;xf(n.props.onMove,{dragIds:u,parentId:s===er?null:s,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(s)}),n.open(s)}}),[e,t.current,n.props]);return i}function _$(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const k$=d.memo(function({index:e,style:n}){pf(),Qb();const r=Oe(),i=_$(e),o=d.useRef(null),a=T$(i),s=I$(o,i),l=d.useCallback(f=>{o.current=f,s(f)},[s]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),h=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),p={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:h,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const g=r.renderNode,m=r.renderRow;return T.jsx(m,{node:i,innerRef:l,attrs:p,children:T.jsx(g,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",nu=null;function Xf(){pf();const t=Oe();return T.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,s=o.parent;t.focus(a||s,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),Sf(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),wf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(nu),yo+=e.key,nu=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:T.jsx(MS,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:KS,innerElementType:zS,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:k$})})}function ru(t){return t.isFiltered?N$(t.root,t.isMatch.bind(t)):R$(t.root)}function R$(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(Jf),e}function N$(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let l=a.parent;for(;l;)n[l.id]=!0,l=l.parent}if(a.children)for(let l of a.children)i(l)}function o(a){var s;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((s=a.children)===null||s===void 0||s.forEach(o))}return i(t),o(t),r.forEach(Jf),r}function Jf(t,e){t.rowIndex=e}const iu=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(h){a(h)}}function l(c){try{u(r.throw(c))}catch(h){a(h)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=iS;class vn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=pl(this),this.visibleNodes=ru(this),this.idToIndex=iu(this.visibleNodes)}update(e){this.props=e,this.root=pl(this),this.visibleNodes=ru(this),this.idToIndex=iu(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=zn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=zn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),s=Math.max(i,o);return this.visibleNodes.slice(a,s+1)}indexOf(e){const n=$f(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?Df(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:Tf(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",s=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{vn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=vn.editPromise;n&&n(e),vn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&yf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(En.cursor({type:"none"}))}showCursor(e){this.dispatch(En.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=Ma(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oi(this.root,e=>{e.isInternal&&e.open()})}closeAll(){oi(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),Cf(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!zn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!zn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(pS())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||Xf}get renderRow(){return this.props.renderRow||uS}get renderNode(){return this.props.children||cS}get renderDragPreview(){return this.props.renderDragPreview||Pf}get renderCursor(){return this.props.renderCursor||lS}}function Ee(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var M$=typeof Symbol=="function"&&Symbol.observable||"@@observable",ou=M$,So=()=>Math.random().toString(36).substring(7).split("").join("."),A$={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Ot=A$;function Qf(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function L$(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(j$(t))return"date";if(F$(t))return"error";const n=K$(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function K$(t){return typeof t.constructor=="function"?t.constructor.name:null}function F$(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function j$(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function dt(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=L$(t)),e}function Zf(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(2):`Expected the root reducer to be a function. Instead, received: '${dt(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ee(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(1):`Expected the enhancer to be a function. Instead, received: '${dt(n)}'`);return n(Zf)(t,e)}let r=t,i=e,o=new Map,a=o,s=0,l=!1;function u(){a===o&&(a=new Map,o.forEach((v,y)=>{a.set(y,v)}))}function c(){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(4):`Expected the listener to be a function. Instead, received: '${dt(v)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let y=!0;u();const S=s++;return a.set(S,v),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,u(),a.delete(S),o=null}}}function p(v){if(!Qf(v))throw new Error(process.env.NODE_ENV==="production"?Ee(7):`Actions must be plain objects. Instead, the actual type was: '${dt(v)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?Ee(17):`Action "type" property must be a string. Instead, the actual type was: '${dt(v.type)}'. Value was: '${v.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Ee(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,v)}finally{l=!1}return(o=a).forEach(S=>{S()}),v}function g(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ee(10):`Expected the nextReducer to be a function. Instead, received: '${dt(v)}`);r=v,p({type:Ot.REPLACE})}function m(){const v=h;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?Ee(11):`Expected the observer to be an object. Instead, received: '${dt(y)}'`);function S(){const P=y;P.next&&P.next(c())}return S(),{unsubscribe:v(S)}},[ou](){return this}}}return p({type:Ot.INIT}),{dispatch:p,subscribe:h,getState:c,replaceReducer:g,[ou]:m}}function au(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function z$(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Ot.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Qf(t))return`The ${o} has unexpected type of "${dt(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(s=>!e.hasOwnProperty(s)&&!r[s]);if(a.forEach(s=>{r[s]=!0}),!(n&&n.type===Ot.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function H$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Ot.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ee(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Ot.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function su(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const s=e[a];process.env.NODE_ENV!=="production"&&typeof t[s]>"u"&&au(`No reducer provided for key "${s}"`),typeof t[s]=="function"&&(n[s]=t[s])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{H$(n)}catch(a){o=a}return function(s={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const h=z$(s,n,l,i);h&&au(h)}let u=!1;const c={};for(let h=0;h<r.length;h++){const p=r[h],g=n[p],m=s[p],f=g(m,l);if(typeof f>"u"){const v=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Ee(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[p]=f,u=u||f!==m}return u=u||r.length!==Object.keys(s).length,u?c:s}}function B$(t=wn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const W$=su({nodes:su({focus:gS,edit:hS,open:vS,selection:mS,drag:B$}),dnd:yS}),U$=wn();function V$({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(Zf(W$,wn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>U$),s=d.useMemo(()=>new vn(o.current,t,r,i),[]),l=d.useRef(0);return d.useMemo(()=>{l.current+=1,s.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>s),d.useEffect(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),d.useEffect(()=>{s.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[s.props.searchTerm]),T.jsx(cf.Provider,{value:s,children:T.jsx(hf.Provider,{value:l.current,children:T.jsx(df.Provider,{value:a.nodes,children:T.jsx(ff.Provider,{value:a.dnd,children:T.jsx(x0,Object.assign({backend:C$,options:{rootElement:s.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function G$(){const t=Oe(),[,e]=zf(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Yf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(En.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function q$(t){return G$(),t.children}function Y$(){const e=Oe().props.renderContainer||Xf;return T.jsx(T.Fragment,{children:T.jsx(e,{})})}function X$(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=XE(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||Pf;return T.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class J${constructor(e){this.root=Q$(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function Q$(t){const e=new eh({id:"ROOT"},null);return e.children=t.map(n=>Ha(n,e)),e}function Ha(t,e){const n=new eh(t,e);return t.children&&(n.children=t.children.map(r=>Ha(r,n))),n}class eh{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=Ha(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let Z$=0;function ex(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new J$(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:h})=>{const p={id:`simple-tree-id-${Z$++}`,name:""};return h==="internal"&&(p.children=[]),r.create({parentId:u,index:c,data:p}),n(r.data),p},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function tx(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
101
|
-
Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=ex(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function nx(t,e){const n=tx(t);return T.jsxs(V$,{treeProps:n,imperativeHandle:e,children:[T.jsx(q$,{children:T.jsx(Y$,{})}),T.jsx(X$,{})]})}const rx=d.forwardRef(nx),th=({top:t,left:e})=>T.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10,width:`calc(100% - ${24+e}px)`}});function ix(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,s=r.current,l=a||(s?s instanceof Element?s:s.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function lu(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function ox(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],s=o[1],l=d.useRef(!1);d.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=ix(d.useCallback(function(h){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(p){var g=p[0],m=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=lu(g,m,"inlineSize"),v=lu(g,m,"blockSize"),y=f?r(f):void 0,S=v?r(v):void 0;if(u.current.width!==y||u.current.height!==S){var w={width:y,height:S};u.current.width=y,u.current.height=S,n.current?n.current(w):l.current||s(w)}})}),i.current.instance.observe(h,{box:t.box}),function(){i.current&&i.current.instance.unobserve(h)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Le=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Le||{}),$t=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))($t||{});const li=t=>t?t.nodeType===Le.SEPARATOR:!1,ui=t=>t?t.nodeType===Le.TITLE:!1,Hn=t=>!li(t)&&!ui(t),nh=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:s,append:l,prepend:u,getItem:c,move:h,items:p}=Pv({initialItems:JSON.parse(JSON.stringify(t)),getKey:I=>I.id,getChildren:I=>I.children||[]}),[g,m]=d.useState(),f=(I=[])=>{const A=p.map(Y=>Y.key);r(...A);const G=JSON.parse(JSON.stringify(I));G.length>0&&o(null,0,...G),m(void 0)},v=I=>{const A=c(I);A&&m(A.value)},y=(I,A,G)=>{var Y;if(I){const M=c(I);M&&o(I,G??((Y=M.children)==null?void 0:Y.length)??0,A)}else o(null,G??p.length,A)},S=I=>{var A;return(A=c(I))==null?void 0:A.value},w=(I,A)=>{var K;const G=c(I);if(!G){console.error("No item found");return}let Y=((K=G.children)==null?void 0:K.map(L=>L.value))??null;const M=A.childrenCount??G.value.childrenCount??0;if((Y==null?void 0:Y.length)===0&&M>0&&(Y=null),A.children&&(Y=[...Y??[],...A.children]),A.children){const L=new Set(A.children.map(H=>H.id));Y=A.children.filter(H=>!L.has(H.id)),Y=[...Y??[],...A.children]}const R={...G.value,...A,children:Y,childrenCount:(Y==null?void 0:Y.length)??M};i(I,R)},P=I=>{r(I)},x=async I=>{if(!e){console.error("No refresh callback provided");return}try{const A=await e(I);w(I,A)}catch(A){console.error("error while refreshing node:",A)}},O=(I,A)=>{o(null,A??p.length,I)},D=(I,A)=>{const G=c(I);if(!G){console.error("No item found");return}const Y={...G.value,children:A,childrenCount:A.length,hasLoadedChildren:A.length>0};i(I,Y)},b=I=>{const A=[],G=c(I);if(!G)return[];A.push(G.value);const Y=M=>{const R=k(M);if(!R)return;const K=c(R);K&&(A.push(K.value),Y(R))};return Y(I),A.reverse()},k=I=>{var A;return((A=c(I))==null?void 0:A.parentKey)??null},B=I=>{const A=k(I);if(!A)return null;const G=c(A);return G?G.value:null},N=(I,A)=>{a(I,A)},z=(I,A)=>{s(I,A)},E=(I,A)=>{l(I,A)},_=(I,A)=>{u(I,A)},j=(I,A,G)=>{h(I,A,G)},U=I=>{j(I.sourceId,I.newParentId,I.index)},X=async I=>{if(!n)return[];const A=await n(I);return w(I,{children:A,hasLoadedChildren:!0,childrenCount:A.length}),A};return d.useEffect(()=>{const I=A=>{A.forEach(G=>{G.children&&G.children.length>0&&(G.value.children&&(G.value.children=G.children.map(Y=>Y.value),G.value.childrenCount=G.children.length),I(G.children))})};I(p),console.log("treeData",p)},[p]),{nodes:p,addChild:y,updateNode:w,deleteNode:P,addRootNode:O,selectedNode:g,setSelectedNode:m,refreshNode:x,setChildren:D,insertBeforeNode:N,insertAfterNode:z,handleMove:U,prependToNode:_,moveNode:j,appendToNode:E,move:h,resetTree:f,handleLoadChildren:X,selectNodeById:v,getParent:B,getNode:S,getParentId:k,getAncestors:b}},Ba=d.createContext(null),ax=({children:t,onRefresh:e,initialNodeId:n,onLoadChildren:r,initialTreeData:i})=>{const o=d.useRef(null),[a,s]=d.useState(null),[l,u]=d.useState(n??null),c=nh(i??[],e,r);return T.jsx(Ba.Provider,{value:{treeApiRef:o,treeData:c,root:a,initialTargetId:l,setInitialTargetId:u,setRoot:s},children:t})},Wa=()=>{const t=d.useContext(Ba);if(!t)throw new Error("TreeContext not found");return t},sx=({initialOpenState:t,selectedNodeId:e,rootNodeId:n,renderNode:r,canDrop:i,canDrag:o,afterMove:a})=>{const{ref:s,width:l,height:u}=ox(),c=Wa(),h=(c==null?void 0:c.treeData.nodes)??[],p=m=>{var j,U,X,I;const f=JSON.parse(JSON.stringify(h)),v=m.dragNodes[0],y=m.parentId?((j=m.parentNode)==null?void 0:j.data.children)??[]:f,S=m.dragNodes[0].data.value.id,w=m.dragNodes[0].data,P=(U=m.parentNode)==null?void 0:U.data;if((P==null?void 0:P.value.nodeType)===Le.TITLE||(P==null?void 0:P.value.nodeType)===Le.SEPARATOR)return null;const x=w.parentKey??n,O=m.parentId??n;let D=m.index+0,b=null,k=O;const B=((I=(X=v.parent)==null?void 0:X.children)==null?void 0:I.findIndex(A=>A.data.value.id===S))??0;if(x===O){if(B===D)return null;D=D<B?D:D-1}const N=m.index-1,z=y[N],E=m.index,_=y[E];return m.index===0?(k=m.parentId??n,b=$t.FIRST_CHILD):!P&&m.index===1&&!Hn(z.value)?(k=n,D=1,b=$t.FIRST_CHILD):m.index===y.length?(k=k??n,b=$t.LAST_CHILD):z&&Hn(z.value)?(k=z.value.id,b=$t.RIGHT):_&&Hn(_.value)&&(b=$t.LEFT,k=_.value.id),b&&k?{targetModeId:k,mode:b,oldParentId:x,index:D,newParentId:m.parentId,sourceId:S}:null},g=m=>{const f=p(m);f&&(c==null||c.treeData.handleMove(f),a==null||a(f))};if(c)return T.jsx("div",{ref:s,className:"c__tree-view--container",children:T.jsx(rx,{data:h,ref:c.treeApiRef,openByDefault:!1,selectionFollowsFocus:!1,disableMultiSelection:!0,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:m=>o?!o(m):!1,disableDrop:({parentNode:m,dragNodes:f,index:v})=>{var x,O;if(i&&!i({parentNode:m,dragNodes:f,index:v}))return m.id!=="__REACT_ARBORIST_INTERNAL_ROOT__"&&(m.data.value.canDrop=!1),!0;const y=f[0];if(y&&y.isDragging&&y.willReceiveDrop||((x=m.data.value)==null?void 0:x.nodeType)===Le.TITLE||((O=m.data.value)==null?void 0:O.nodeType)===Le.SEPARATOR)return!0;if(m.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const D=h[v-1],b=h[v],k=h[v+1],B=li(D==null?void 0:D.value),N=li(b==null?void 0:b.value),z=ui(D==null?void 0:D.value),E=ui(b==null?void 0:b.value),_=Hn(k==null?void 0:k.value);return!!(v===0&&(N||E)||B&&E&&_||z&&N&&_)}const S=m==null?void 0:m.isOpen,w=(m==null?void 0:m.data.value.childrenCount)&&m.data.value.childrenCount>0||(m==null?void 0:m.data.children)&&m.data.children.length>0;if(!w)return m.data.value.canDrop=!0,!1;let P=m.data.value.childrenCount&&m.data.value.childrenCount>0&&(m==null?void 0:m.data.children)&&m.data.children.length>0;return P=P??!0,!S&&!P&&w?(m.data.value.canDrop=!0,!0):(m.data.value.canDrop=!0,!1)},paddingBottom:30,paddingTop:2,width:l,initialOpenState:t,height:u,overscanCount:20,selection:e,renderCursor:th,renderRow:lx,rowClassName:"c__tree-view--row",children:r})})},lx=({children:t,...e})=>{const n=e.node.data.value.nodeType===Le.TITLE,r=e.node.data.value.nodeType===Le.SEPARATOR,{style:i}=e.attrs,o={...i};return n||r?d.createElement("div",{...e.attrs,key:e.node.id,style:o,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},t):d.createElement("div",{...e.attrs,style:o,key:e.node.id,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},T.jsx("div",{style:{padding:"0 12px",paddingBottom:"100px"},children:t}))},ux=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cx(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function dx(t){return"nodeType"in t}function fx(t){var e,n;return t?cx(t)?t:dx(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const rh=ux?d.useLayoutEffect:d.useEffect;function ih(t){const e=d.useRef(t);return rh(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function uu(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return rh(()=>{n.current!==t&&(n.current=t)},e),n}function hx(t){const e=ih(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let wo={};function px(t,e){return d.useMemo(()=>{const n=wo[t]==null?0:wo[t]+1;return wo[t]=n,t+"-"+n},[t,e])}var Un;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Un||(Un={}));function cu(){}const gx=Object.freeze({x:0,y:0});function vx(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function mx(t,e,n){const r=vx(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=t.left-a-(1-i)*parseFloat(n),u=t.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,h=o?t.height/o:t.height;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l}}const yx={ignoreTransform:!1};function oh(t,e){e===void 0&&(e=yx);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=fx(t).getComputedStyle(t);u&&(n=mx(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function du(t){return oh(t,{ignoreTransform:!0})}var dn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(dn||(dn={}));var fu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(fu||(fu={}));var ht;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ht||(ht={}));ht.Space,ht.Enter,ht.Esc,ht.Space,ht.Enter,ht.Tab;var hu;(function(t){t[t.RightClick=2]="RightClick"})(hu||(hu={}));var pu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(pu||(pu={}));var gu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(gu||(gu={}));dn.Backward+"",dn.Forward+"",dn.Backward+"",dn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function bx(t){let{callback:e,disabled:n}=t;const r=ih(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const Sx={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:cu,draggableNodes:new Map,over:null,measureDroppableContainers:cu},wx=d.createContext(Sx);({...gx});var vu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(vu||(vu={}));const Ex="Droppable",$x={timeout:25};function xx(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=px(Ex),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=d.useContext(wx),c=d.useRef({disabled:n}),h=d.useRef(!1),p=d.useRef(null),g=d.useRef(null),{disabled:m,updateMeasurementsFor:f,timeout:v}={...$x,...i},y=uu(f??r),S=d.useCallback(()=>{if(!h.current){h.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),g.current=null},v)},[v]),w=bx({callback:S,disabled:m||!a}),P=d.useCallback((b,k)=>{w&&(k&&(w.unobserve(k),h.current=!1),b&&w.observe(b))},[w]),[x,O]=hx(P),D=uu(e);return d.useEffect(()=>{!w||!x.current||(w.disconnect(),h.current=!1,w.observe(x.current))},[x,w]),d.useEffect(()=>(s({type:Un.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:p,data:D}}),()=>s({type:Un.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(s({type:Un.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,s]),{active:a,rect:p,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:O}}const Cx=t=>{const{isOver:e,setNodeRef:n}=xx({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),T.jsx("div",{className:"c__dnd--droppable",ref:n,children:t.children})},Tx=({children:t,onClick:e,node:n,dragHandle:r,style:i,forceLoading:o})=>{var w,P;const a=Wa(),s=d.useRef(null),[l,u]=d.useState(!1),[c,h]=d.useState(!1),p=o??l,g=n.willReceiveDrop||c,m=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((w=n.data.children)==null?void 0:w.length)??0)>0,f=((P=n.children)==null?void 0:P.length)??!1,v=n.isLeaf||!m,y=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(a==null?void 0:a.treeData.handleLoadChildren(n.data.value.id)),u(!1),n.open()}},[v,f,n,a==null?void 0:a.treeData]),S=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(s.current=setTimeout(()=>{y()},500)),s.current&&!x&&clearTimeout(s.current)},[y,n.isOpen,n.isDragging]);return d.useEffect(()=>{S(g)},[g,S]),n.data.value.nodeType===Le.SEPARATOR?T.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.nodeType===Le.TITLE?T.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.headerTitle}):T.jsx(Cx,{id:n.id,data:{data:n.data,nodeApi:n},onOver:h,children:T.jsxs("div",{onClick:x=>{x.target.closest(".c__tree-view--node")||x.stopPropagation(),e==null||e()},onKeyDown:x=>{x.stopPropagation()},ref:r,style:i,className:ot("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&T.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&T.jsxs(T.Fragment,{children:[p&&T.jsx("div",{className:"c__tree-view--node__loading",children:T.jsx(Da,{})}),!p&&T.jsx("span",{onClick:x=>{x.stopPropagation(),y()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})};exports.CunninghamProvider=mh;exports.CustomTabs=Jb;exports.DropdownMenu=ed;exports.Header=rd;exports.HorizontalSeparator=qo;exports.Label=Dd;exports.LanguagePicker=nd;exports.LeftPanel=id;exports.MainLayout=jm;exports.ProConnectButton=yh;exports.QuickSearch=qb;exports.QuickSearchGroup=Yb;exports.QuickSearchInput=uf;exports.QuickSearchItem=Mr;exports.QuickSearchItemTemplate=Xb;exports.Spinner=Da;exports.TreeApi=vn;exports.TreeContext=Ba;exports.TreeProvider=ax;exports.TreeView=sx;exports.TreeViewItem=Tx;exports.TreeViewMoveModeEnum=$t;exports.TreeViewNodeTypeEnum=Le;exports.TreeViewSeparator=th;exports.WithLabel=Hm;exports.cunninghamConfig=jo;exports.getLocales=yu;exports.headerHeight=zm;exports.isNode=Hn;exports.isSeparator=li;exports.isTitle=ui;exports.useDropdownMenu=td;exports.useResponsive=ar;exports.useTree=nh;exports.useTreeContext=Wa;
|
|
91
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return T.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Uv="DialogDescriptionWarning",Gv=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${af(Uv).contentName}}.`;return T.useEffect(()=>{var o;const i=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},qv=Yd,Yv=Jd,Zv=Qd,Xv=ef,Rn='[cmdk-group=""]',ro='[cmdk-group-items=""]',Jv='[cmdk-group-heading=""]',Na='[cmdk-item=""]',ps=`${Na}:not([aria-disabled="true"])`,Go="cmdk-item-select",Ct="data-value",Qv=(t,e,n)=>m5(t,e,n),lf=T.createContext(void 0),lr=()=>T.useContext(lf),sf=T.createContext(void 0),Ra=()=>T.useContext(sf),uf=T.createContext(void 0),cf=T.forwardRef((t,e)=>{let n=sn(()=>{var L,N;return{search:"",value:(N=(L=t.value)!=null?L:t.defaultValue)!=null?N:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=sn(()=>new Set),i=sn(()=>new Map),o=sn(()=>new Map),a=sn(()=>new Set),l=df(t),{label:s,children:u,value:c,onValueChange:h,filter:p,shouldFilter:g,loop:m,disablePointerSelection:f=!1,vimBindings:v=!0,...y}=t,C=it(),S=it(),P=it(),x=T.useRef(null),O=c1();Kt(()=>{if(c!==void 0){let L=c.trim();n.current.value=L,D.emit()}},[c]),Kt(()=>{O(6,E)},[]);let D=T.useMemo(()=>({subscribe:L=>(a.current.add(L),()=>a.current.delete(L)),snapshot:()=>n.current,setState:(L,N,K)=>{var A,z,B;if(!Object.is(n.current[L],N)){if(n.current[L]=N,L==="search")H(),V(),O(1,R);else if(L==="value"&&(K||O(5,E),((A=l.current)==null?void 0:A.value)!==void 0)){let F=N??"";(B=(z=l.current).onValueChange)==null||B.call(z,F);return}D.emit()}},emit:()=>{a.current.forEach(L=>L())}}),[]),b=T.useMemo(()=>({value:(L,N,K)=>{var A;N!==((A=o.current.get(L))==null?void 0:A.value)&&(o.current.set(L,{value:N,keywords:K}),n.current.filtered.items.set(L,k(N,K)),O(2,()=>{V(),D.emit()}))},item:(L,N)=>(r.current.add(L),N&&(i.current.has(N)?i.current.get(N).add(L):i.current.set(N,new Set([L]))),O(3,()=>{H(),V(),n.current.value||R(),D.emit()}),()=>{o.current.delete(L),r.current.delete(L),n.current.filtered.items.delete(L);let K=I();O(4,()=>{H(),(K==null?void 0:K.getAttribute("id"))===L&&R(),D.emit()})}),group:L=>(i.current.has(L)||i.current.set(L,new Set),()=>{o.current.delete(L),i.current.delete(L)}),filter:()=>l.current.shouldFilter,label:s||t["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:C,inputId:P,labelId:S,listInnerRef:x}),[]);function k(L,N){var K,A;let z=(A=(K=l.current)==null?void 0:K.filter)!=null?A:Qv;return L?z(L,n.current.search,N):0}function V(){if(!n.current.search||l.current.shouldFilter===!1)return;let L=n.current.filtered.items,N=[];n.current.filtered.groups.forEach(A=>{let z=i.current.get(A),B=0;z.forEach(F=>{let X=L.get(F);B=Math.max(X,B)}),N.push([A,B])});let K=x.current;j().sort((A,z)=>{var B,F;let X=A.getAttribute("id"),te=z.getAttribute("id");return((B=L.get(te))!=null?B:0)-((F=L.get(X))!=null?F:0)}).forEach(A=>{let z=A.closest(ro);z?z.appendChild(A.parentElement===z?A:A.closest(`${ro} > *`)):K.appendChild(A.parentElement===K?A:A.closest(`${ro} > *`))}),N.sort((A,z)=>z[1]-A[1]).forEach(A=>{var z;let B=(z=x.current)==null?void 0:z.querySelector(`${Rn}[${Ct}="${encodeURIComponent(A[0])}"]`);B==null||B.parentElement.appendChild(B)})}function R(){let L=j().find(K=>K.getAttribute("aria-disabled")!=="true"),N=L==null?void 0:L.getAttribute(Ct);D.setState("value",N||void 0)}function H(){var L,N,K,A;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let z=0;for(let B of r.current){let F=(N=(L=o.current.get(B))==null?void 0:L.value)!=null?N:"",X=(A=(K=o.current.get(B))==null?void 0:K.keywords)!=null?A:[],te=k(F,X);n.current.filtered.items.set(B,te),te>0&&z++}for(let[B,F]of i.current)for(let X of F)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(B);break}n.current.filtered.count=z}function E(){var L,N,K;let A=I();A&&(((L=A.parentElement)==null?void 0:L.firstChild)===A&&((K=(N=A.closest(Rn))==null?void 0:N.querySelector(Jv))==null||K.scrollIntoView({block:"nearest"})),A.scrollIntoView({block:"nearest"}))}function I(){var L;return(L=x.current)==null?void 0:L.querySelector(`${Na}[aria-selected="true"]`)}function j(){var L;return Array.from(((L=x.current)==null?void 0:L.querySelectorAll(ps))||[])}function W(L){let N=j()[L];N&&D.setState("value",N.getAttribute(Ct))}function Z(L){var N;let K=I(),A=j(),z=A.findIndex(F=>F===K),B=A[z+L];(N=l.current)!=null&&N.loop&&(B=z+L<0?A[A.length-1]:z+L===A.length?A[0]:A[z+L]),B&&D.setState("value",B.getAttribute(Ct))}function _(L){let N=I(),K=N==null?void 0:N.closest(Rn),A;for(;K&&!A;)K=L>0?s1(K,Rn):u1(K,Rn),A=K==null?void 0:K.querySelector(ps);A?D.setState("value",A.getAttribute(Ct)):Z(L)}let M=()=>W(j().length-1),G=L=>{L.preventDefault(),L.metaKey?M():L.altKey?_(1):Z(1)},Y=L=>{L.preventDefault(),L.metaKey?W(0):L.altKey?_(-1):Z(-1)};return T.createElement(be.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:L=>{var N;if((N=y.onKeyDown)==null||N.call(y,L),!L.defaultPrevented)switch(L.key){case"n":case"j":{v&&L.ctrlKey&&G(L);break}case"ArrowDown":{G(L);break}case"p":case"k":{v&&L.ctrlKey&&Y(L);break}case"ArrowUp":{Y(L);break}case"Home":{L.preventDefault(),W(0);break}case"End":{L.preventDefault(),M();break}case"Enter":if(!L.nativeEvent.isComposing&&L.keyCode!==229){L.preventDefault();let K=I();if(K){let A=new Event(Go);K.dispatchEvent(A)}}}}},T.createElement("label",{"cmdk-label":"",htmlFor:b.inputId,id:b.labelId,style:f1},s),Ei(t,L=>T.createElement(sf.Provider,{value:D},T.createElement(lf.Provider,{value:b},L))))}),e1=T.forwardRef((t,e)=>{var n,r;let i=it(),o=T.useRef(null),a=T.useContext(uf),l=lr(),s=df(t),u=(r=(n=s.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Kt(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let c=ff(i,o,[t.value,t.children,o],t.keywords),h=Ra(),p=Ft(O=>O.value&&O.value===c.current),g=Ft(O=>u||l.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);T.useEffect(()=>{let O=o.current;if(!(!O||t.disabled))return O.addEventListener(Go,m),()=>O.removeEventListener(Go,m)},[g,t.onSelect,t.disabled]);function m(){var O,D;f(),(D=(O=s.current).onSelect)==null||D.call(O,c.current)}function f(){h.setState("value",c.current,!0)}if(!g)return null;let{disabled:v,value:y,onSelect:C,forceMount:S,keywords:P,...x}=t;return T.createElement(be.div,{ref:Qn([o,e]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||l.getDisablePointerSelection()?void 0:f,onClick:v?void 0:m},t.children)}),t1=T.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...o}=t,a=it(),l=T.useRef(null),s=T.useRef(null),u=it(),c=lr(),h=Ft(g=>i||c.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Kt(()=>c.group(a),[]),ff(a,l,[t.value,t.heading,s]);let p=T.useMemo(()=>({id:a,forceMount:i}),[i]);return T.createElement(be.div,{ref:Qn([l,e]),...o,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&T.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Ei(t,g=>T.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},T.createElement(uf.Provider,{value:p},g))))}),n1=T.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=T.useRef(null),o=Ft(a=>!a.search);return!n&&!o?null:T.createElement(be.div,{ref:Qn([i,e]),...r,"cmdk-separator":"",role:"separator"})}),r1=T.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,o=Ra(),a=Ft(c=>c.search),l=Ft(c=>c.value),s=lr(),u=T.useMemo(()=>{var c;let h=(c=s.listInnerRef.current)==null?void 0:c.querySelector(`${Na}[${Ct}="${encodeURIComponent(l)}"]`);return h==null?void 0:h.getAttribute("id")},[]);return T.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),T.createElement(be.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":u,id:s.inputId,type:"text",value:i?t.value:a,onChange:c=>{i||o.setState("search",c.target.value),n==null||n(c.target.value)}})}),i1=T.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,o=T.useRef(null),a=T.useRef(null),l=lr();return T.useEffect(()=>{if(a.current&&o.current){let s=a.current,u=o.current,c,h=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let p=s.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(s),()=>{cancelAnimationFrame(c),h.unobserve(s)}}},[]),T.createElement(be.div,{ref:Qn([o,e]),...i,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},Ei(t,s=>T.createElement("div",{ref:Qn([a,l.listInnerRef]),"cmdk-list-sizer":""},s)))}),o1=T.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...l}=t;return T.createElement(qv,{open:n,onOpenChange:r},T.createElement(Yv,{container:a},T.createElement(Zv,{"cmdk-overlay":"",className:i}),T.createElement(Xv,{"aria-label":t.label,"cmdk-dialog":"",className:o},T.createElement(cf,{ref:e,...l}))))}),a1=T.forwardRef((t,e)=>Ft(n=>n.filtered.count===0)?T.createElement(be.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),l1=T.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...o}=t;return T.createElement(be.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Ei(t,a=>T.createElement("div",{"aria-hidden":!0},a)))}),Jn=Object.assign(cf,{List:i1,Item:e1,Input:r1,Group:t1,Separator:n1,Dialog:o1,Empty:a1,Loading:l1});function s1(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function u1(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function df(t){let e=T.useRef(t);return Kt(()=>{e.current=t}),e}var Kt=typeof window>"u"?T.useEffect:T.useLayoutEffect;function sn(t){let e=T.useRef();return e.current===void 0&&(e.current=t()),e}function Qn(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Ft(t){let e=Ra(),n=()=>t(e.snapshot());return da.useSyncExternalStore(e.subscribe,n,n)}function ff(t,e,n,r=[]){let i=T.useRef(),o=lr();return Kt(()=>{var a;let l=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():i.current}})(),s=r.map(u=>u.trim());o.value(t,l,s),(a=e.current)==null||a.setAttribute(Ct,l),i.current=l}),i}var c1=()=>{let[t,e]=T.useState(),n=sn(()=>new Map);return Kt(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function d1(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Ei({asChild:t,children:e},n){return t&&T.isValidElement(e)?T.cloneElement(d1(e),{ref:e.ref},n(e.props.children)):n(e)}var f1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qo=({withPadding:t=!0})=>w.jsx("div",{className:ot("c__horizontal-separator",{"with-padding":t})}),hf=({loading:t,inputValue:e,onFilter:n,placeholder:r,children:i,withSeparator:o=!0})=>{const{t:a}=_t.useCunningham();return i?w.jsxs(w.Fragment,{children:[i,o&&w.jsx(qo,{})]}):w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"quick-search-input-container",children:[!t&&w.jsx("span",{className:"material-icons",children:"search"}),t&&w.jsx("div",{children:w.jsx(Pa,{size:"sm"})}),w.jsx(Jn.Input,{autoFocus:!0,"aria-label":a("Quick search input"),onClick:l=>{l.stopPropagation()},role:"combobox",value:e,placeholder:r,onValueChange:n})]}),o&&w.jsx(qo,{withPadding:!1})]})},h1=t=>{let e=!1;return d.Children.forEach(t,n=>{e=e||!!n}),e},p1=({onFilter:t,inputContent:e,inputValue:n,loading:r,showInput:i=!0,label:o,placeholder:a,children:l})=>{const s=d.useRef(null);return w.jsx(w.Fragment,{children:w.jsx("div",{className:"quick-search-container",children:w.jsxs(Jn,{label:o,shouldFilter:!1,ref:s,children:[i&&w.jsx(hf,{loading:r,withSeparator:h1(l),inputValue:n,onFilter:t,placeholder:a,children:e}),w.jsx(Jn.List,{children:w.jsx("div",{children:l})})]})})})},Lr=({children:t,onSelect:e,id:n})=>w.jsx(Jn.Item,{value:n,onSelect:e,children:t}),g1=({group:t,onSelect:e,renderElement:n})=>{var r,i;return!t.showWhenEmpty&&t.elements.length===0?null:w.jsx("div",{className:"pt-base",children:w.jsxs(Jn.Group,{heading:t.groupName,forceMount:!1,children:[(r=t.startActions)==null?void 0:r.map((o,a)=>w.jsx(Lr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.elements.map((o,a)=>w.jsx(Lr,{id:`${t.groupName}-element-${a}`,onSelect:()=>{e==null||e(o)},children:n==null?void 0:n(o)},`${t.groupName}-element-${a}`)),(i=t.endActions)==null?void 0:i.map((o,a)=>w.jsx(Lr,{onSelect:o.onSelect,children:o.content},`${t.groupName}-action-${a}`)),t.emptyString&&t.elements.length===0&&w.jsx("span",{className:"ml-b clr-greyscale-500",children:t.emptyString})]},t.groupName)})},v1=({alwaysShowRight:t,left:e,right:n})=>{const{isDesktop:r}=ar();return w.jsxs("div",{className:"c__quick-search-item-template",children:[w.jsx("div",{className:"c__quick-search-item-template__left",children:e}),r&&n&&w.jsx("div",{className:ot("c__quick-search-item-template__right",{"show-right-on-focus":t}),children:n})]})},m1=({tabs:t,defaultSelectedTab:e,fullWidth:n=!1})=>t.length===0?null:w.jsx("div",{className:ot("c__tabs",{"c__tabs__full-width":n}),children:w.jsxs(sg,{defaultSelectedKey:e,children:[w.jsx(cg,{"aria-label":"History of Ancient Rome",children:t.map(r=>w.jsxs(fg,{id:r.id,children:[r.icon&&w.jsx("span",{className:"material-icons",children:r.icon}),r.label]},r.id))}),t.map(r=>w.jsx(hg,{id:r.id,children:r.content},r.id))]})}),pf=d.createContext(null);function Oe(){const t=d.useContext(pf);if(t===null)throw new Error("No Tree Api Provided");return t}const gf=d.createContext(null);function y1(){const t=d.useContext(gf);if(t===null)throw new Error("Provide a NodesContext");return t}const vf=d.createContext(null);function b1(){const t=d.useContext(vf);if(t===null)throw new Error("Provide a DnDContext");return t}const mf=d.createContext(0);function yf(){d.useContext(mf)}function Mr(t,e,n){return Math.max(Math.min(t,n),e)}function bf(t){return t&&t.isLeaf}function Sf(t){return t&&t.isInternal&&!t.isOpen}function Cf(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const wf=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},Ef=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function S1(){}function La(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=La(n,e);if(r)return r}return null}function oi(t,e){if(e(t),t.children)for(let n of t.children)oi(n,e)}function $f(t){const e=Tf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=C1(e,r);break}n==null||n.focus()}function xf(t){const e=Tf(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=w1(e,r);break}n==null||n.focus()}function C1(t,e){return e+1<t.length?t[e+1]:t[0]}function w1(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function Tf(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function Hn(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function Pf(t){return t===null?null:wt(t)}function wt(t){return typeof t=="string"?t:t.id}function E1(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Df(t,...e){if(t)return t(...e)}function Of(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function _f(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function If(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const $1=Object.freeze(Object.defineProperty({__proto__:null,access:Hn,bound:Mr,dfs:La,focusNextElement:$f,focusPrevElement:xf,getInsertIndex:_f,getInsertParentId:If,identify:wt,identifyNull:Pf,indexOf:Ef,isClosed:Sf,isDescendant:wf,isItem:bf,isOpenWithEmptyChildren:Cf,mergeRefs:E1,noop:S1,safeRun:Df,waitFor:Of,walk:oi},Symbol.toStringTag,{value:"Module"})),x1={display:"flex",alignItems:"center",zIndex:1},T1={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},P1={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},D1=d.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return w.jsxs("div",{style:Object.assign(Object.assign({},x1),i),children:[w.jsx("div",{style:Object.assign({},P1)}),w.jsx("div",{style:Object.assign({},T1)})]})});function O1({node:t,attrs:e,innerRef:n,children:r}){return w.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function _1(t){return w.jsxs("div",{ref:t.dragHandle,style:t.style,children:[w.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?w.jsx(k1,Object.assign({},t)):w.jsx(I1,Object.assign({},t))]})}function I1(t){return w.jsx(w.Fragment,{children:w.jsx("span",{children:t.node.data.name})})}function k1({node:t}){const e=d.useRef();return d.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),w.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function io(t){return{type:"EDIT",id:t}}function N1(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Xt(t){return{type:"FOCUS",id:t}}function R1(){return{type:"TREE_BLUR"}}function L1(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class ai{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===er}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new ai(Object.assign({},this))}edit(){return this.tree.edit(this)}}const er="__REACT_ARBORIST_INTERNAL_ROOT__";function gs(t){var e;function n(o,a,l){const s=t.accessId(o),u=new ai({tree:t,data:o,level:a,parent:l,id:s,children:null,isDraggable:t.isDraggable(o),rowIndex:null}),c=t.accessChildren(o);return c&&(u.children=c.map(h=>n(h,a+1,u))),u}const r=new ai({tree:t,id:er,data:{id:er},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(o=>n(o,0,r)),r}const Yo={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function vs(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function M1(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:vs(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:vs(t.unfiltered,e)}):t}const Cn=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Fe={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:wt(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(wt)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(wt)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:wt(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:wt(t)})};function A1(t=Cn().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const wn={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function K1(t=Cn().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return Cn().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const F1={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},j1=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},H1=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function kf({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return w.jsxs(z1,{isDragging:i,children:[w.jsx(V1,{offset:t,children:w.jsx(W1,{id:n,dragIds:r})}),w.jsx(B1,{mouse:e,count:r.length})]})}const z1=d.memo(function(e){return e.isDragging?w.jsx("div",{style:F1,children:e.children}):null});function V1(t){return w.jsx("div",{className:"row preview",style:j1(t.offset),children:t.children})}function B1(t){const{count:e,mouse:n}=t;return e>1?w.jsx("div",{className:"selected-count",style:H1(n),children:e}):null}const W1=d.memo(function(e){const n=Oe(),r=n.get(e.id);return r?w.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Zo(){return Zo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zo.apply(null,arguments)}function ms(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xo(t,e){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xo(t,e)}function U1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xo(t,e)}var ys=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function G1(t,e){return!!(t===e||ys(t)&&ys(e))}function q1(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!G1(t[n],e[n]))return!1;return!0}function oo(t,e){e===void 0&&(e=q1);var n,r=[],i,o=!1;function a(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return a}var Y1=typeof performance=="object"&&typeof performance.now=="function",bs=Y1?function(){return performance.now()}:function(){return Date.now()};function Ss(t){cancelAnimationFrame(t.id)}function Z1(t,e){var n=bs();function r(){bs()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ao=-1;function Cs(t){if(t===void 0&&(t=!1),ao===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),ao=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ao}var Jt=null;function ws(t){if(t===void 0&&(t=!1),Jt===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Jt="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Jt="negative":Jt="positive-ascending"),document.body.removeChild(e),Jt}return Jt}process.env.NODE_ENV;var X1=150,J1=function(e,n){return e},Ar=null,Kr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Ar=new WeakSet,Kr=new WeakSet);function Q1(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,a=t.getStartIndexForOffset,l=t.getStopIndexForStartIndex,s=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(h){U1(p,h);function p(m){var f;return f=h.call(this,m)||this,f._instanceProps=s(f.props,ms(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:ms(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=oo(function(v,y,C,S){return f.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:y,visibleStartIndex:C,visibleStopIndex:S})}),f._callOnScroll=void 0,f._callOnScroll=oo(function(v,y,C){return f.props.onScroll({scrollDirection:v,scrollOffset:y,scrollUpdateWasRequested:C})}),f._getItemStyle=void 0,f._getItemStyle=function(v){var y=f.props,C=y.direction,S=y.itemSize,P=y.layout,x=f._getItemStyleCache(u&&S,u&&P,u&&C),O;if(x.hasOwnProperty(v))O=x[v];else{var D=n(f.props,v,f._instanceProps),b=i(f.props,v,f._instanceProps),k=C==="horizontal"||P==="horizontal",V=C==="rtl",R=k?D:0;x[v]=O={position:"absolute",left:V?void 0:R,right:V?R:void 0,top:k?0:D,height:k?"100%":b,width:k?b:"100%"}}return O},f._getItemStyleCache=void 0,f._getItemStyleCache=oo(function(v,y,C){return{}}),f._onScrollHorizontal=function(v){var y=v.currentTarget,C=y.clientWidth,S=y.scrollLeft,P=y.scrollWidth;f.setState(function(x){if(x.scrollOffset===S)return null;var O=f.props.direction,D=S;if(O==="rtl")switch(ws()){case"negative":D=-S;break;case"positive-descending":D=P-C-S;break}return D=Math.max(0,Math.min(D,P-C)),{isScrolling:!0,scrollDirection:x.scrollOffset<D?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(v){var y=v.currentTarget,C=y.clientHeight,S=y.scrollHeight,P=y.scrollTop;f.setState(function(x){if(x.scrollOffset===P)return null;var O=Math.max(0,Math.min(P,S-C));return{isScrolling:!0,scrollDirection:x.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(v){var y=f.props.outerRef;f._outerRef=v,typeof y=="function"?y(v):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=v)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&Ss(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=Z1(f._resetIsScrolling,X1)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}p.getDerivedStateFromProps=function(f,v){return em(f,v),c(f),null};var g=p.prototype;return g.scrollTo=function(f){f=Math.max(0,f),this.setState(function(v){return v.scrollOffset===f?null:{scrollDirection:v.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(f,v){v===void 0&&(v="auto");var y=this.props,C=y.itemCount,S=y.layout,P=this.state.scrollOffset;f=Math.max(0,Math.min(f,C-1));var x=0;if(this._outerRef){var O=this._outerRef;S==="vertical"?x=O.scrollWidth>O.clientWidth?Cs():0:x=O.scrollHeight>O.clientHeight?Cs():0}this.scrollTo(o(this.props,f,v,P,this._instanceProps,x))},g.componentDidMount=function(){var f=this.props,v=f.direction,y=f.initialScrollOffset,C=f.layout;if(typeof y=="number"&&this._outerRef!=null){var S=this._outerRef;v==="horizontal"||C==="horizontal"?S.scrollLeft=y:S.scrollTop=y}this._callPropsCallbacks()},g.componentDidUpdate=function(){var f=this.props,v=f.direction,y=f.layout,C=this.state,S=C.scrollOffset,P=C.scrollUpdateWasRequested;if(P&&this._outerRef!=null){var x=this._outerRef;if(v==="horizontal"||y==="horizontal")if(v==="rtl")switch(ws()){case"negative":x.scrollLeft=-S;break;case"positive-ascending":x.scrollLeft=S;break;default:var O=x.clientWidth,D=x.scrollWidth;x.scrollLeft=D-O-S;break}else x.scrollLeft=S;else x.scrollTop=S}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Ss(this._resetIsScrollingTimeoutId)},g.render=function(){var f=this.props,v=f.children,y=f.className,C=f.direction,S=f.height,P=f.innerRef,x=f.innerElementType,O=f.innerTagName,D=f.itemCount,b=f.itemData,k=f.itemKey,V=k===void 0?J1:k,R=f.layout,H=f.outerElementType,E=f.outerTagName,I=f.style,j=f.useIsScrolling,W=f.width,Z=this.state.isScrolling,_=C==="horizontal"||R==="horizontal",M=_?this._onScrollHorizontal:this._onScrollVertical,G=this._getRangeToRender(),Y=G[0],L=G[1],N=[];if(D>0)for(var K=Y;K<=L;K++)N.push(d.createElement(v,{data:b,key:V(K,b),index:K,isScrolling:j?Z:void 0,style:this._getItemStyle(K)}));var A=r(this.props,this._instanceProps);return d.createElement(H||E||"div",{className:y,onScroll:M,ref:this._outerRefSetter,style:Zo({position:"relative",height:S,width:W,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:C},I)},d.createElement(x||O||"div",{children:N,ref:P,style:{height:_?"100%":A,pointerEvents:Z?"none":void 0,width:_?A:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var v=this._getRangeToRender(),y=v[0],C=v[1],S=v[2],P=v[3];this._callOnItemsRendered(y,C,S,P)}}if(typeof this.props.onScroll=="function"){var x=this.state,O=x.scrollDirection,D=x.scrollOffset,b=x.scrollUpdateWasRequested;this._callOnScroll(O,D,b)}},g._getRangeToRender=function(){var f=this.props,v=f.itemCount,y=f.overscanCount,C=this.state,S=C.isScrolling,P=C.scrollDirection,x=C.scrollOffset;if(v===0)return[0,0,0,0];var O=a(this.props,x,this._instanceProps),D=l(this.props,O,x,this._instanceProps),b=!S||P==="backward"?Math.max(1,y):1,k=!S||P==="forward"?Math.max(1,y):1;return[Math.max(0,O-b),Math.max(0,Math.min(v-1,D+k)),O,D]},p}(d.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var em=function(e,n){var r=e.children,i=e.direction,o=e.height,a=e.layout,l=e.innerTagName,s=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(l!=null||s!=null)&&Kr&&!Kr.has(c)&&(Kr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=i==="horizontal"||a==="horizontal";switch(i){case"horizontal":case"vertical":Ar&&!Ar.has(c)&&(Ar.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!h&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},tm=Q1({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,o,a){var l=e.direction,s=e.height,u=e.itemCount,c=e.itemSize,h=e.layout,p=e.width,g=l==="horizontal"||h==="horizontal",m=g?p:s,f=Math.max(0,u*c-m),v=Math.min(f,n*c),y=Math.max(0,n*c-m+c+a);switch(r==="smart"&&(i>=y-m&&i<=v+m?r="auto":r="center"),r){case"start":return v;case"end":return y;case"center":{var C=Math.round(y+(v-y)/2);return C<Math.ceil(m/2)?0:C>f+Math.floor(m/2)?f:C}case"auto":default:return i>=y&&i<=v?i:i<y?y:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,o=e.height,a=e.itemCount,l=e.itemSize,s=e.layout,u=e.width,c=i==="horizontal"||s==="horizontal",h=n*l,p=c?u:o,g=Math.ceil((p+r-h)/l);return Math.max(0,Math.min(a-1,n+g-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function nm(){var t,e;const n=Oe(),i=b1().cursor;if(!i||i.type!=="line")return null;const o=n.indent,a=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),l=o*i.level,s=n.renderCursor;return w.jsx(s,{top:a,left:l,indent:o})}var rm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const im=d.forwardRef(function(e,n){const{children:r}=e,i=rm(e,["children"]),o=Oe();return w.jsxs("div",Object.assign({ref:n},i,{onClick:a=>{a.currentTarget===a.target&&o.deselectAll()},children:[w.jsx(om,{}),r]}))}),om=()=>{const t=Oe();return w.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:w.jsx(nm,{})})};var am=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const lm=d.forwardRef(function(e,n){var r,i,o,a,{style:l}=e,s=am(e,["style"]);const u=Oe(),c=(i=(r=u.props.padding)!==null&&r!==void 0?r:u.props.paddingTop)!==null&&i!==void 0?i:0,h=(a=(o=u.props.padding)!==null&&o!==void 0?o:u.props.paddingBottom)!==null&&a!==void 0?a:0;return w.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},l),{height:`${parseFloat(l.height)+c+h}px`})},s))});var Nf=d.createContext({dragDropManager:void 0}),Le;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(Le||(Le={}));function J(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var o;if(e===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;o=new Error(e.replace(/%s/g,function(){return r[a++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var Ma="dnd-core/INIT_COORDS",$i="dnd-core/BEGIN_DRAG",Aa="dnd-core/PUBLISH_DRAG_SOURCE",xi="dnd-core/HOVER",Ti="dnd-core/DROP",Pi="dnd-core/END_DRAG";function Es(t,e){return{type:Ma,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Fr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fr=function(n){return typeof n}:Fr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fr(t)}function sm(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n},t)}function um(t,e){return t.filter(function(n){return n!==e})}function Rf(t){return Fr(t)==="object"}function cm(t,e){var n=new Map,r=function(a){n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o,a){o===1&&i.push(a)}),i}function dm(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var fm={type:Ma,payload:{clientOffset:null,sourceClientOffset:null}};function hm(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,o=i===void 0?!0:i,a=r.clientOffset,l=r.getSourceClientOffset,s=t.getMonitor(),u=t.getRegistry();t.dispatch(Es(a)),pm(n,s,u);var c=mm(n,s);if(c===null){t.dispatch(fm);return}var h=null;if(a){if(!l)throw new Error("getSourceClientOffset must be defined");gm(l),h=l(c)}t.dispatch(Es(a,h));var p=u.getSource(c),g=p.beginDrag(s,c);if(g!=null){vm(g),u.pinSource(c);var m=u.getSourceType(c);return{type:$i,payload:{itemType:m,item:g,sourceId:c,clientOffset:a||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}}function pm(t,e,n){J(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){J(n.getSource(r),"Expected sourceIds to be registered.")})}function gm(t){J(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function vm(t){J(Rf(t),"Item must be an object.")}function mm(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function ym(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Aa}}}function Jo(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function bm(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;Sm(n);var o=n.slice(0),a=t.getMonitor(),l=t.getRegistry();Cm(o,a,l);var s=a.getItemType();return wm(o,l,s),Em(o,a,l),{type:xi,payload:{targetIds:o,clientOffset:i||null}}}}function Sm(t){J(Array.isArray(t),"Expected targetIds to be an array.")}function Cm(t,e,n){J(e.isDragging(),"Cannot call hover while not dragging."),J(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];J(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var o=n.getTarget(i);J(o,"Expected targetIds to be registered.")}}function wm(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=e.getTargetType(i);Jo(o,n)||t.splice(r,1)}}function Em(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function $s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$s(Object(n),!0).forEach(function(r){$m(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$s(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xm(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();Tm(r);var o=Om(r);o.forEach(function(a,l){var s=Pm(a,l,i,r),u={type:Ti,payload:{dropResult:xs(xs({},n),s)}};t.dispatch(u)})}}function Tm(t){J(t.isDragging(),"Cannot call drop while not dragging."),J(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Pm(t,e,n,r){var i=n.getTarget(t),o=i?i.drop(r,t):void 0;return Dm(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function Dm(t){J(typeof t>"u"||Rf(t),"Drop result must either be an object or undefined.")}function Om(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function _m(t){return function(){var n=t.getMonitor(),r=t.getRegistry();Im(n);var i=n.getSourceId();if(i!=null){var o=r.getSource(i,!0);o.endDrag(n,i),r.unpinSource()}return{type:Pi}}}function Im(t){J(t.isDragging(),"Cannot call endDrag while not dragging.")}function km(t){return{beginDrag:hm(t),publishDragSource:ym(t),hover:bm(t),drop:xm(t),endDrag:_m(t)}}function Nm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lm(t,e,n){return Rm(t.prototype,e),t}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mm=function(){function t(e,n){var r=this;Nm(this,t),Ln(this,"store",void 0),Ln(this,"monitor",void 0),Ln(this,"backend",void 0),Ln(this,"isSetUp",!1),Ln(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return Lm(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(a){return function(){for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];var c=a.apply(n,s);typeof c<"u"&&r(c)}}var o=km(this);return Object.keys(o).reduce(function(a,l){var s=o[l];return a[l]=i(s),a},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function Ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ts=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),lo=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ps={INIT:"@@redux/INIT"+lo(),REPLACE:"@@redux/REPLACE"+lo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+lo()}};function Am(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Km(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Hm(t))return"date";if(jm(t))return"error";var n=Fm(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Fm(t){return typeof t.constructor=="function"?t.constructor.name:null}function jm(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Hm(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Qt(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=Km(t)),e}function Lf(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ie(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ie(1):"Expected the enhancer to be a function. Instead, received: '"+Qt(n)+"'");return n(Lf)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ie(2):"Expected the root reducer to be a function. Instead, received: '"+Qt(t)+"'");var i=t,o=e,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)throw new Error(process.env.NODE_ENV==="production"?Ie(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function h(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ie(4):"Expected the listener to be a function. Instead, received: '"+Qt(f)+"'");if(s)throw new Error(process.env.NODE_ENV==="production"?Ie(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return u(),l.push(f),function(){if(v){if(s)throw new Error(process.env.NODE_ENV==="production"?Ie(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,u();var C=l.indexOf(f);l.splice(C,1),a=null}}}function p(f){if(!Am(f))throw new Error(process.env.NODE_ENV==="production"?Ie(7):"Actions must be plain objects. Instead, the actual type was: '"+Qt(f)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof f.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ie(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(s)throw new Error(process.env.NODE_ENV==="production"?Ie(9):"Reducers may not dispatch actions.");try{s=!0,o=i(o,f)}finally{s=!1}for(var v=a=l,y=0;y<v.length;y++){var C=v[y];C()}return f}function g(f){if(typeof f!="function")throw new Error(process.env.NODE_ENV==="production"?Ie(10):"Expected the nextReducer to be a function. Instead, received: '"+Qt(f));i=f,p({type:Ps.REPLACE})}function m(){var f,v=h;return f={subscribe:function(C){if(typeof C!="object"||C===null)throw new Error(process.env.NODE_ENV==="production"?Ie(11):"Expected the observer to be an object. Instead, received: '"+Qt(C)+"'");function S(){C.next&&C.next(c())}S();var P=v(S);return{unsubscribe:P}}},f[Ts]=function(){return this},f}return p({type:Ps.INIT}),r={dispatch:p,subscribe:h,getState:c,replaceReducer:g},r[Ts]=m,r}var zm=function(e,n){return e===n};function Vm(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Bm(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zm;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ds(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Os(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ds(Object(n),!0).forEach(function(r){Wm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Wm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _s={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Um(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_s,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Ma:case $i:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case xi:return Vm(t.clientOffset,n.clientOffset)?t:Os(Os({},t),{},{clientOffset:n.clientOffset});case Pi:case Ti:return _s;default:return t}}var Ka="dnd-core/ADD_SOURCE",Fa="dnd-core/ADD_TARGET",ja="dnd-core/REMOVE_SOURCE",Di="dnd-core/REMOVE_TARGET";function Gm(t){return{type:Ka,payload:{sourceId:t}}}function qm(t){return{type:Fa,payload:{targetId:t}}}function Ym(t){return{type:ja,payload:{sourceId:t}}}function Zm(t){return{type:Di,payload:{targetId:t}}}function Is(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Is(Object(n),!0).forEach(function(r){Xm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Is(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Xm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jm={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Qm(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jm,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case $i:return ke(ke({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Aa:return ke(ke({},t),{},{isSourcePublic:!0});case xi:return ke(ke({},t),{},{targetIds:n.targetIds});case Di:return t.targetIds.indexOf(n.targetId)===-1?t:ke(ke({},t),{},{targetIds:um(t.targetIds,n.targetId)});case Ti:return ke(ke({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Pi:return ke(ke({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function ey(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ka:case Fa:return t+1;case ja:case Di:return t-1;default:return t}}var li=[],Ha=[];li.__IS_NONE__=!0;Ha.__IS_ALL__=!0;function ty(t,e){if(t===li)return!1;if(t===Ha||typeof e>"u")return!0;var n=dm(e,t);return n.length>0}function ny(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi:break;case Ka:case Fa:case Di:case ja:return li;case $i:case Aa:case Pi:case Ti:default:return Ha}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,o=i===void 0?[]:i,a=cm(r,o),l=a.length>0||!Bm(r,o);if(!l)return li;var s=o[o.length-1],u=r[r.length-1];return s!==u&&(s&&a.push(s),u&&a.push(u)),a}function ry(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ns(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ks(Object(n),!0).forEach(function(r){iy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ny(t.dirtyHandlerIds,{type:e.type,payload:Ns(Ns({},e.payload),{},{prevTargetIds:sm(t,"dragOperation.targetIds",[])})}),dragOffset:Um(t.dragOffset,e),refCount:ey(t.refCount,e),dragOperation:Qm(t.dragOperation,e),stateId:ry(t.stateId)}}function ay(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Mf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ly(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:Mf(ay(e,r),n)}function sy(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:Mf(e,n)}function uy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dy(t,e,n){return cy(t.prototype,e),t}function Rs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fy=function(){function t(e,n){uy(this,t),Rs(this,"store",void 0),Rs(this,"registry",void 0),this.store=e,this.registry=n}return dy(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=i.handlerIds;J(typeof n=="function","listener must be a function."),J(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,l=function(){var u=r.store.getState(),c=u.stateId;try{var h=c===a||c===a+1&&!ty(u.dirtyHandlerIds,o);h||n()}finally{a=c}};return this.store.subscribe(l)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;J(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,o=function(){var l=r.store.getState().dragOffset;l!==i&&(i=l,n())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return J(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(J(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),o=this.getItemType();return Jo(i,o)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(J(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),o=this.getItemType();return i!==o?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(n),a=this.getItemType();if(a&&!Jo(o,a))return!1;var l=this.getTargetIds();if(!l.length)return!1;var s=l.indexOf(n);return i?s===l.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return ly(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return sy(this.store.getState().dragOffset)}}]),t}(),hy=0;function py(){return hy++}function jr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jr=function(n){return typeof n}:jr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jr(t)}function gy(t){J(typeof t.canDrag=="function","Expected canDrag to be a function."),J(typeof t.beginDrag=="function","Expected beginDrag to be a function."),J(typeof t.endDrag=="function","Expected endDrag to be a function.")}function vy(t){J(typeof t.canDrop=="function","Expected canDrop to be a function."),J(typeof t.hover=="function","Expected hover to be a function."),J(typeof t.drop=="function","Expected beginDrag to be a function.")}function Qo(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return Qo(n,!1)});return}J(typeof t=="string"||jr(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const Ls=typeof global<"u"?global:self,Af=Ls.MutationObserver||Ls.WebKitMutationObserver;function Kf(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function my(t){let e=1;const n=new Af(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const yy=typeof Af=="function"?my:Kf;class by{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=yy(this.flush),this.requestErrorThrow=Kf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Sy{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Cy{create(e){const n=this.freeTasks,r=n.length?n.pop():new Sy(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Ff=new by,wy=new Cy(Ff.registerPendingError);function Ey(t){Ff.enqueueTask(wy.create(t))}function $y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ty(t,e,n){return xy(t.prototype,e),t}function en(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Py(t,e){return Iy(t)||_y(t,e)||Oy(t,e)||Dy()}function Dy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
92
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oy(t,e){if(t){if(typeof t=="string")return Ms(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ms(t,e)}}function Ms(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _y(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function Iy(t){if(Array.isArray(t))return t}function ky(t){var e=py().toString();switch(t){case Le.SOURCE:return"S".concat(e);case Le.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function As(t){switch(t[0]){case"S":return Le.SOURCE;case"T":return Le.TARGET;default:J(!1,"Cannot parse handler ID: ".concat(t))}}function Ks(t,e){var n=t.entries(),r=!1;do{var i=n.next(),o=i.done,a=Py(i.value,2),l=a[1];if(l===e)return!0;r=!!o}while(!r);return!1}var Ny=function(){function t(e){$y(this,t),en(this,"types",new Map),en(this,"dragSources",new Map),en(this,"dropTargets",new Map),en(this,"pinnedSourceId",null),en(this,"pinnedSource",null),en(this,"store",void 0),this.store=e}return Ty(t,[{key:"addSource",value:function(n,r){Qo(n),gy(r);var i=this.addHandler(Le.SOURCE,n,r);return this.store.dispatch(Gm(i)),i}},{key:"addTarget",value:function(n,r){Qo(n,!0),vy(r);var i=this.addHandler(Le.TARGET,n,r);return this.store.dispatch(qm(i)),i}},{key:"containsHandler",value:function(n){return Ks(this.dragSources,n)||Ks(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;J(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,o=i?this.pinnedSource:this.dragSources.get(n);return o}},{key:"getTarget",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return J(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return J(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=As(n);return r===Le.SOURCE}},{key:"isTargetId",value:function(n){var r=As(n);return r===Le.TARGET}},{key:"removeSource",value:function(n){var r=this;J(this.getSource(n),"Expected an existing source."),this.store.dispatch(Ym(n)),Ey(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){J(this.getTarget(n),"Expected an existing target."),this.store.dispatch(Zm(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);J(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){J(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var o=ky(n);return this.types.set(o,r),n===Le.SOURCE?this.dragSources.set(o,i):n===Le.TARGET&&this.dropTargets.set(o,i),o}}]),t}();function Ry(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=Ly(r),o=new fy(i,new Ny(i)),a=new Mm(i,o),l=t(a,e,n);return a.receiveBackend(l),a}function Ly(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Lf(oy,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var My=["children"];function Ay(t,e){return Hy(t)||jy(t,e)||Fy(t,e)||Ky()}function Ky(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
93
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fy(t,e){if(t){if(typeof t=="string")return Fs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fs(t,e)}}function Fs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function jy(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function Hy(t){if(Array.isArray(t))return t}function zy(t,e){if(t==null)return{};var n=Vy(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vy(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var js=0,Hr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),By=d.memo(function(e){var n=e.children,r=zy(e,My),i=Wy(r),o=Ay(i,2),a=o[0],l=o[1];return d.useEffect(function(){if(l){var s=jf();return++js,function(){--js===0&&(s[Hr]=null)}}},[]),w.jsx(Nf.Provider,Object.assign({value:a},{children:n}),void 0)});function Wy(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=Uy(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function Uy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jf(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[Hr]||(i[Hr]={dragDropManager:Ry(t,e,n,r)}),i[Hr]}function jf(){return typeof global<"u"?global:window}function Gy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yy(t,e,n){return qy(t.prototype,e),t}function Hs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var so=!1,uo=!1,Zy=function(){function t(e){Gy(this,t),Hs(this,"internalMonitor",void 0),Hs(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return Yy(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){J(!so,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return so=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{so=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;J(!uo,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return uo=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{uo=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function Xy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qy(t,e,n){return Jy(t.prototype,e),t}function zs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var co=!1,eb=function(){function t(e){Xy(this,t),zs(this,"internalMonitor",void 0),zs(this,"targetId",null),this.internalMonitor=e.getMonitor()}return Qy(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;J(!co,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return co=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{co=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function tb(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function nb(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var i=e;tb(i);var o=n?function(a){return t(a,n)}:t;return rb(i,o)}}function Hf(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=nb(r);e[n]=function(){return i}}}),e}function Vs(t,e){typeof t=="function"?t(e):t.current=e}function rb(t,e){var n=t.ref;return J(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?d.cloneElement(t,{ref:function(i){Vs(n,i),Vs(e,i)}}):d.cloneElement(t,{ref:e})}function zr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zr=function(n){return typeof n}:zr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(t)}function ea(t){return t!==null&&zr(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ta(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(e),s=0;s<o.length;s++){var u=o[s];if(!l(u))return!1;var c=t[u],h=e[u];if(i=void 0,i===!1||i===void 0&&c!==h)return!1}return!0}function ib(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ob(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ab(t,e,n){return ob(t.prototype,e),t}function Ce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lb=function(){function t(e){var n=this;ib(this,t),Ce(this,"hooks",Hf({dragSource:function(i,o){n.clearDragSource(),n.dragSourceOptions=o||null,ea(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,o){n.clearDragPreview(),n.dragPreviewOptions=o||null,ea(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),Ce(this,"handlerId",null),Ce(this,"dragSourceRef",null),Ce(this,"dragSourceNode",void 0),Ce(this,"dragSourceOptionsInternal",null),Ce(this,"dragSourceUnsubscribe",void 0),Ce(this,"dragPreviewRef",null),Ce(this,"dragPreviewNode",void 0),Ce(this,"dragPreviewOptionsInternal",null),Ce(this,"dragPreviewUnsubscribe",void 0),Ce(this,"lastConnectedHandlerId",null),Ce(this,"lastConnectedDragSource",null),Ce(this,"lastConnectedDragSourceOptions",null),Ce(this,"lastConnectedDragPreview",null),Ce(this,"lastConnectedDragPreviewOptions",null),Ce(this,"backend",void 0),this.backend=e}return ab(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!ta(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!ta(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function sb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ub(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cb(t,e,n){return ub(t.prototype,e),t}function Ue(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var db=function(){function t(e){var n=this;sb(this,t),Ue(this,"hooks",Hf({dropTarget:function(i,o){n.clearDropTarget(),n.dropTargetOptions=o,ea(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),Ue(this,"handlerId",null),Ue(this,"dropTargetRef",null),Ue(this,"dropTargetNode",void 0),Ue(this,"dropTargetOptionsInternal",null),Ue(this,"unsubscribeDropTarget",void 0),Ue(this,"lastConnectedHandlerId",null),Ue(this,"lastConnectedDropTarget",null),Ue(this,"lastConnectedDropTargetOptions",null),Ue(this,"backend",void 0),this.backend=e}return cb(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!ta(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function fb(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function hb(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var jt=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Vr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vr=function(n){return typeof n}:Vr=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vr(t)}function pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vb(t,e,n){return gb(t.prototype,e),t}function fo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var mb=function(){function t(e,n,r){pb(this,t),fo(this,"spec",void 0),fo(this,"monitor",void 0),fo(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return vb(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,o=null;return Vr(r.item)==="object"?o=r.item:typeof r.item=="function"?o=r.item(i):o={},(n=o)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,o=this.monitor,a=i.isDragging;return a?a(o):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,o=n.end;o&&o(r.getItem(),r),i.reconnect()}}]),t}();function yb(t,e,n){var r=d.useMemo(function(){return new mb(t,e,n)},[e,n]);return d.useEffect(function(){r.spec=t},[t]),r}function Vt(){var t=d.useContext(Nf),e=t.dragDropManager;return J(e!=null,"Expected drag drop context"),e}function bb(t){return d.useMemo(function(){var e=t.type;return J(e!=null,"spec.type must be defined"),e},[t])}function Sb(t,e){return $b(t)||Eb(t,e)||wb(t,e)||Cb()}function Cb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wb(t,e){if(t){if(typeof t=="string")return Bs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bs(t,e)}}function Bs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Eb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function $b(t){if(Array.isArray(t))return t}function xb(t,e,n){var r=Vt(),i=yb(t,e,n),o=bb(t);jt(function(){if(o!=null){var l=hb(o,i,r),s=Sb(l,2),u=s[0],c=s[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,e,n,i,o])}function Tb(t){return _b(t)||Ob(t)||Db(t)||Pb()}function Pb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Db(t,e){if(t){if(typeof t=="string")return na(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(t,e)}}function Ob(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function _b(t){if(Array.isArray(t))return na(t)}function na(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zf(t,e){var n=Tb(e||[]);return e==null&&typeof t!="function"&&n.push(t),d.useMemo(function(){return typeof t=="function"?t():t},n)}function Ib(){var t=Vt();return d.useMemo(function(){return new Zy(t)},[t])}function kb(t,e){var n=Vt(),r=d.useMemo(function(){return new lb(n.getBackend())},[n]);return jt(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),jt(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var ho,Ws;function Nb(){return Ws||(Ws=1,ho=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}),ho}var Rb=Nb();const Lb=d0(Rb);function Mb(t,e){return jb(t)||Fb(t,e)||Kb(t,e)||Ab()}function Ab(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kb(t,e){if(t){if(typeof t=="string")return Us(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(t,e)}}function Us(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function jb(t){if(Array.isArray(t))return t}function Vf(t,e,n){var r=d.useState(function(){return e(t)}),i=Mb(r,2),o=i[0],a=i[1],l=d.useCallback(function(){var s=e(t);Lb(o,s)||(a(s),n&&n())},[o,t,n]);return jt(l),[o,l]}function Hb(t,e){return Wb(t)||Bb(t,e)||Vb(t,e)||zb()}function zb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vb(t,e){if(t){if(typeof t=="string")return Gs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gs(t,e)}}function Gs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function Wb(t){if(Array.isArray(t))return t}function Ub(t,e,n){var r=Vf(t,e,n),i=Hb(r,2),o=i[0],a=i[1];return jt(function(){var s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(a,{handlerIds:[s]})},[t,a]),o}function Bf(t,e,n){return Ub(e,t||function(){return{}},function(){return n.reconnect()})}function Gb(t){return d.useMemo(function(){return t.hooks.dragSource()},[t])}function qb(t){return d.useMemo(function(){return t.hooks.dragPreview()},[t])}function Yb(t,e){var n=zf(t,e);J(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var r=Ib(),i=kb(n.options,n.previewOptions);return xb(n,r,i),[Bf(n.collect,r,i),Gb(i),qb(i)]}function Zb(t){var e=t.accept;return d.useMemo(function(){return J(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function Xb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qb(t,e,n){return Jb(t.prototype,e),t}function qs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var e9=function(){function t(e,n){Xb(this,t),qs(this,"spec",void 0),qs(this,"monitor",void 0),this.spec=e,this.monitor=n}return Qb(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function t9(t,e){var n=d.useMemo(function(){return new e9(t,e)},[e]);return d.useEffect(function(){n.spec=t},[t]),n}function n9(t,e){return a9(t)||o9(t,e)||i9(t,e)||r9()}function r9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i9(t,e){if(t){if(typeof t=="string")return Ys(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ys(t,e)}}function Ys(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o9(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function a9(t){if(Array.isArray(t))return t}function l9(t,e,n){var r=Vt(),i=t9(t,e),o=Zb(t);jt(function(){var l=fb(o,i,r),s=n9(l,2),u=s[0],c=s[1];return e.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,e,i,n,o.map(function(a){return a.toString()}).join("|")])}function s9(){var t=Vt();return d.useMemo(function(){return new eb(t)},[t])}function u9(t){var e=Vt(),n=d.useMemo(function(){return new db(e.getBackend())},[e]);return jt(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function c9(t){return d.useMemo(function(){return t.hooks.dropTarget()},[t])}function Wf(t,e){var n=zf(t,e),r=s9(),i=u9(n.options);return l9(n,r,i),[Bf(n.collect,r,i),c9(i)]}function d9(t,e){return g9(t)||p9(t,e)||h9(t,e)||f9()}function f9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
99
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h9(t,e){if(t){if(typeof t=="string")return Zs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zs(t,e)}}function Zs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p9(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,l;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(s){o=!0,l=s}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function g9(t){if(Array.isArray(t))return t}function v9(t){var e=Vt(),n=e.getMonitor(),r=Vf(n,t),i=d9(r,2),o=i[0],a=i[1];return d.useEffect(function(){return n.subscribeToOffsetChange(a)}),d.useEffect(function(){return n.subscribeToStateChange(a)}),o}function Uf(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function m9(t,e){return t.filter(function(n){return n!==e})}function y9(t,e){var n=new Set,r=function(a){return n.add(a)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(o){return i.push(o)}),i}function b9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S9(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C9(t,e,n){return S9(t.prototype,e),t}function Xs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w9=function(){function t(e){b9(this,t),Xs(this,"entered",[]),Xs(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return C9(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,o=function(l){return r.isNodeInDocument(l)&&(!l.contains||l.contains(n))};return this.entered=y9(this.entered.filter(o),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=m9(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),E9=Uf(function(){return/firefox/i.test(navigator.userAgent)}),Gf=Uf(function(){return!!window.safari});function $9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x9(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function T9(t,e,n){return x9(t.prototype,e),t}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Js=function(){function t(e,n){$9(this,t),Mn(this,"xs",void 0),Mn(this,"ys",void 0),Mn(this,"c1s",void 0),Mn(this,"c2s",void 0),Mn(this,"c3s",void 0);for(var r=e.length,i=[],o=0;o<r;o++)i.push(o);i.sort(function(b,k){return e[b]<e[k]?-1:1});for(var a=[],l=[],s,u,c=0;c<r-1;c++)s=e[c+1]-e[c],u=n[c+1]-n[c],a.push(s),l.push(u/s);for(var h=[l[0]],p=0;p<a.length-1;p++){var g=l[p],m=l[p+1];if(g*m<=0)h.push(0);else{s=a[p];var f=a[p+1],v=s+f;h.push(3*v/((v+f)/g+(v+s)/m))}}h.push(l[l.length-1]);for(var y=[],C=[],S,P=0;P<h.length-1;P++){S=l[P];var x=h[P],O=1/a[P],D=x+h[P+1]-S-S;y.push((S-x-D)*O),C.push(D*O*O)}this.xs=e,this.ys=n,this.c1s=h,this.c2s=y,this.c3s=C}return T9(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,o=this.c1s,a=this.c2s,l=this.c3s,s=r.length-1;if(n===r[s])return i[s];for(var u=0,c=l.length-1,h;u<=c;){h=Math.floor(.5*(u+c));var p=r[h];if(p<n)u=h+1;else if(p>n)c=h-1;else return i[h]}s=Math.max(0,c);var g=n-r[s],m=g*g;return i[s]+o[s]*g+a[s]*m+l[s]*g*m}}]),t}(),P9=1;function qf(t){var e=t.nodeType===P9?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Dr(t){return{x:t.clientX,y:t.clientY}}function D9(t){var e;return t.nodeName==="IMG"&&(E9()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function O9(t,e,n,r){var i=t?e.width:n,o=t?e.height:r;return Gf()&&t&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function _9(t,e,n,r,i){var o=D9(e),a=o?t:e,l=qf(a),s={x:n.x-l.x,y:n.y-l.y},u=t.offsetWidth,c=t.offsetHeight,h=r.anchorX,p=r.anchorY,g=O9(o,e,u,c),m=g.dragPreviewWidth,f=g.dragPreviewHeight,v=function(){var D=new Js([0,.5,1],[s.y,s.y/c*f,s.y+f-c]),b=D.interpolate(p);return Gf()&&o&&(b+=(window.devicePixelRatio-1)*f),b},y=function(){var D=new Js([0,.5,1],[s.x,s.x/u*m,s.x+m-u]);return D.interpolate(h)},C=i.offsetX,S=i.offsetY,P=C===0||C,x=S===0||S;return{x:P?C:y(),y:x?S:v()}}var Yf="__NATIVE_FILE__",Zf="__NATIVE_URL__",Xf="__NATIVE_TEXT__",Jf="__NATIVE_HTML__";const Qs=Object.freeze(Object.defineProperty({__proto__:null,FILE:Yf,HTML:Jf,TEXT:Xf,URL:Zf},Symbol.toStringTag,{value:"Module"}));function po(t,e,n){var r=e.reduce(function(i,o){return i||t.getData(o)},"");return r??n}var tn;function Or(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ra=(tn={},Or(tn,Yf,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Or(tn,Jf,{exposeProperties:{html:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Or(tn,Zf,{exposeProperties:{urls:function(e,n){return po(e,n,"").split(`
|
|
100
|
+
`)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Or(tn,Xf,{exposeProperties:{text:function(e,n){return po(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),tn);function I9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k9(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function N9(t,e,n){return k9(t.prototype,e),t}function eu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var R9=function(){function t(e){I9(this,t),eu(this,"item",void 0),eu(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return N9(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(o){i[o]={value:r.config.exposeProperties[o](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function L9(t,e){var n=new R9(ra[t]);return n.loadDataTransfer(e),n}function go(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(ra).filter(function(n){var r=ra[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function M9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A9(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K9(t,e,n){return A9(t.prototype,e),t}function vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var F9=function(){function t(e,n){M9(this,t),vo(this,"ownerDocument",null),vo(this,"globalContext",void 0),vo(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return K9(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function tu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tu(Object(n),!0).forEach(function(r){ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function j9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H9(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function z9(t,e,n){return H9(t.prototype,e),t}function ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var V9=function(){function t(e,n,r){var i=this;j9(this,t),ne(this,"options",void 0),ne(this,"actions",void 0),ne(this,"monitor",void 0),ne(this,"registry",void 0),ne(this,"enterLeaveCounter",void 0),ne(this,"sourcePreviewNodes",new Map),ne(this,"sourcePreviewNodeOptions",new Map),ne(this,"sourceNodes",new Map),ne(this,"sourceNodeOptions",new Map),ne(this,"dragStartSourceIds",null),ne(this,"dropTargetIds",[]),ne(this,"dragEnterTargetIds",[]),ne(this,"currentNativeSource",null),ne(this,"currentNativeHandle",null),ne(this,"currentDragSourceNode",null),ne(this,"altKeyPressed",!1),ne(this,"mouseMoveTimeoutTimer",null),ne(this,"asyncEndDragFrameId",null),ne(this,"dragOverTargetIds",null),ne(this,"lastClientOffset",null),ne(this,"hoverRafId",null),ne(this,"getSourceClientOffset",function(o){var a=i.sourceNodes.get(o);return a&&qf(a)||null}),ne(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),ne(this,"isNodeInDocument",function(o){return!!(o&&i.document&&i.document.body&&i.document.body.contains(o))}),ne(this,"endDragIfSourceWasRemovedFromDOM",function(){var o=i.currentDragSourceNode;o==null||i.isNodeInDocument(o)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),ne(this,"handleTopDragStart",function(o){if(!o.defaultPrevented){var a=i.dragStartSourceIds;i.dragStartSourceIds=null;var l=Dr(o);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:l});var s=o.dataTransfer,u=go(s);if(i.monitor.isDragging()){if(s&&typeof s.setDragImage=="function"){var c=i.monitor.getSourceId(),h=i.sourceNodes.get(c),p=i.sourcePreviewNodes.get(c)||h;if(p){var g=i.getCurrentSourcePreviewNodeOptions(),m=g.anchorX,f=g.anchorY,v=g.offsetX,y=g.offsetY,C={anchorX:m,anchorY:f},S={offsetX:v,offsetY:y},P=_9(h,p,l,C,S);s.setDragImage(p,P.x,P.y)}}try{s==null||s.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(o.target);var x=i.getCurrentSourcePreviewNodeOptions(),O=x.captureDraggingState;O?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(u)i.beginDragNativeItem(u);else{if(s&&!s.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}}}),ne(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleTopDragEnterCapture",function(o){i.dragEnterTargetIds=[];var a=i.enterLeaveCounter.enter(o.target);if(!(!a||i.monitor.isDragging())){var l=o.dataTransfer,s=go(l);s&&i.beginDragNativeItem(s,l)}}),ne(this,"handleTopDragEnter",function(o){var a=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=o.altKey,a.length>0&&i.actions.hover(a,{clientOffset:Dr(o)});var l=a.some(function(s){return i.monitor.canDropOnTarget(s)});l&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),ne(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),ne(this,"handleTopDragOver",function(o){var a=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}i.altKeyPressed=o.altKey,i.lastClientOffset=Dr(o),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(a||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var l=(a||[]).some(function(s){return i.monitor.canDropOnTarget(s)});l?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))}),ne(this,"handleTopDragLeaveCapture",function(o){i.isDraggingNativeItem()&&o.preventDefault();var a=i.enterLeaveCounter.leave(o.target);a&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),ne(this,"handleTopDropCapture",function(o){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var a;o.preventDefault(),(a=i.currentNativeSource)===null||a===void 0||a.loadDataTransfer(o.dataTransfer)}else go(o.dataTransfer)&&o.preventDefault();i.enterLeaveCounter.reset()}),ne(this,"handleTopDrop",function(o){var a=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(a,{clientOffset:Dr(o)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),ne(this,"handleSelectStart",function(o){var a=o.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(o.preventDefault(),a.dragDrop()))}),this.options=new F9(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new w9(this.isNodeInDocument)}return z9(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var o=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){o.sourcePreviewNodes.delete(n),o.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var o=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var a=function(u){return o.handleDragStart(u,n)},l=function(u){return o.handleSelectStart(u)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",a),r.addEventListener("selectstart",l),function(){o.sourceNodes.delete(n),o.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",a),r.removeEventListener("selectstart",l),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,o=function(u){return i.handleDragEnter(u,n)},a=function(u){return i.handleDragOver(u,n)},l=function(u){return i.handleDrop(u,n)};return r.addEventListener("dragenter",o),r.addEventListener("dragover",a),r.addEventListener("drop",l),function(){r.removeEventListener("dragenter",o),r.removeEventListener("dragover",a),r.removeEventListener("drop",l)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return nu({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return nu({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(Qs).some(function(r){return Qs[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=L9(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var o;return(o=r.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),_r;function B9(){return _r||(_r=new Image,_r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),_r}var W9=function(e,n,r){return new V9(e,n,r)};function U9(t){const e=Oe(),n=e.selectedIds,[r,i,o]=Yb(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const a=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(wn.dragStart(t.id,a)),{id:t.id,dragIds:a}},end:()=>{e.hideCursor(),e.dispatch(wn.dragEnd())}}),[n,t]);return d.useEffect(()=>{o(B9())},[o]),i}function G9(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),o=n.height,a=i<o/2,l=!a,s=o/4,u=i>s&&i<o-s;return{x:r,inTopHalf:a,inBottomHalf:l,inMiddle:u,atTop:!u&&a,atBottom:!u&&l}}function q9(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Ir(t,e){return{parentId:t||null,index:e}}function nn(t,e){return{type:"line",index:t,level:e}}function Y9(t){return{type:"highlight",id:t}}function mo(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,o=Ef(r)+1;return{parentId:i,index:o}}function Qf(t){var e;const n=G9(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:o,nextNode:a,prevNode:l}=t,[s,u]=q9(o,l,a,n);if(o&&o.isInternal&&n.inMiddle)return{drop:Ir(o.id,null),cursor:Y9(o.id)};if(!s)return{drop:Ir((e=u==null?void 0:u.parent)===null||e===void 0?void 0:e.id,0),cursor:nn(0,0)};if(bf(s)){const c=Mr(i,(u==null?void 0:u.level)||0,s.level);return{drop:mo(s,c),cursor:nn(s.rowIndex+1,c)}}if(Sf(s)){const c=Mr(i,(u==null?void 0:u.level)||0,s.level);return{drop:mo(s,c),cursor:nn(s.rowIndex+1,c)}}if(Cf(s)){const c=Mr(i,0,s.level+1);return c>s.level?{drop:Ir(s.id,0),cursor:nn(s.rowIndex+1,c)}:{drop:mo(s,c),cursor:nn(s.rowIndex+1,c)}}return{drop:Ir(s==null?void 0:s.id,0),cursor:nn(s.rowIndex+1,s.level+1)}}function Z9(t,e){const n=Oe(),[r,i]=Wf(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(o,a)=>{const l=a.getClientOffset();if(!t.current||!l)return;const{cursor:s,drop:u}=Qf({element:t.current,offset:l,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});u&&n.dispatch(wn.hovering(u.parentId,u.index)),a.canDrop()?s&&n.showCursor(s):n.hideCursor()},drop:(o,a)=>{if(!a.canDrop())return null;let{parentId:l,index:s,dragIds:u}=n.state.dnd;Df(n.props.onMove,{dragIds:u,parentId:l===er?null:l,index:s===null?0:s,dragNodes:n.dragNodes,parentNode:n.get(l)}),n.open(l)}}),[e,t.current,n.props]);return i}function X9(t){const e=Oe(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return d.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const J9=d.memo(function({index:e,style:n}){yf(),y1();const r=Oe(),i=X9(e),o=d.useRef(null),a=U9(i),l=Z9(o,i),s=d.useCallback(f=>{o.current=f,l(f)},[l]),u=r.indent*i.level,c=d.useMemo(()=>({paddingLeft:u}),[u]),h=d.useMemo(()=>{var f,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(f=r.props.padding)!==null&&f!==void 0?f:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),p={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:h,tabIndex:-1,className:r.props.rowClassName};d.useEffect(()=>{var f;!i.isEditing&&i.isFocused&&((f=o.current)===null||f===void 0||f.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,o.current]);const g=r.renderNode,m=r.renderRow;return w.jsx(m,{node:i,innerRef:s,attrs:p,children:w.jsx(g,{node:i,tree:r,style:c,dragHandle:a})})});let yo="",ru=null;function e0(){yf();const t=Oe();return w.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let o=t.mostRecentNode;for(;o&&o.isSelected;)o=o.nextSibling;o||(o=t.lastNode),t.focus(o,{scroll:!1}),t.delete(Array.from(i))}else{const o=t.focusedNode;if(o){const a=o.nextSibling,l=o.parent;t.focus(a||l,{scroll:!1}),t.delete(o)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),$f(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),xf(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const o=t.focusedNode;o?o.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(ru),yo+=e.key,ru=setTimeout(()=>{yo=""},600);const r=t.visibleNodes.find(i=>{const o=i.data.name;return typeof o=="string"?o.toLowerCase().startsWith(yo):!1});r&&t.focus(r.id)},children:w.jsx(tm,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:im,innerElementType:lm,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:J9})})}function iu(t){return t.isFiltered?e4(t.root,t.isMatch.bind(t)):Q9(t.root)}function Q9(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(t0),e}function e4(t,e){const n={},r=[];function i(a){if(!a.isRoot&&e(a)){n[a.id]=!0;let s=a.parent;for(;s;)n[s.id]=!0,s=s.parent}if(a.children)for(let s of a.children)i(s)}function o(a){var l;a.level>=0&&n[a.id]&&r.push(a),a.isOpen&&((l=a.children)===null||l===void 0||l.forEach(o))}return i(t),o(t),r.forEach(t0),r}function t0(t,e){t.rowIndex=e}const ou=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var bo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(c){try{u(r.next(c))}catch(h){a(h)}}function s(c){try{u(r.throw(c))}catch(h){a(h)}}function u(c){c.done?o(c.value):i(c.value).then(l,s)}u((r=r.apply(t,e||[])).next())})};const{safeRun:he,identify:et,identifyNull:je}=$1;class mn{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=gs(this),this.visibleNodes=iu(this),this.idToIndex=ou(this.visibleNodes)}update(e){this.props=e,this.root=gs(this),this.visibleNodes=iu(this),this.idToIndex=ou(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=Hn(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=Hn(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,o=this.indexOf(n);if(o===null)return[];const a=Math.min(i,o),l=Math.max(i,o);return this.visibleNodes.slice(a,l+1)}indexOf(e){const n=Pf(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return bo(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?If(this):e.parentId,o=(n=e.index)!==null&&n!==void 0?n:_f(this),a=(r=e.type)!==null&&r!==void 0?r:"leaf",l=yield he(this.props.onCreate,{type:a,parentId:i,index:o,parentNode:this.get(i)});l&&(this.focus(l),setTimeout(()=>{this.edit(l).then(()=>{this.select(l),this.activate(l)})}))})}delete(e){return bo(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(et),i=r.map(o=>this.get(o)).filter(o=>!!o);yield he(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=et(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(io(n)),new Promise(r=>{mn.editPromise=r})}submit(e,n){return bo(this,void 0,void 0,function*(){if(!e)return;const r=et(e);yield he(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(io(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(io(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(je(e));n&&he(this.props.onActivate,n)}resolveEdit(e){const n=mn.editPromise;n&&n(e),mn.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Xt(et(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&he(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,o=this.visibleStopIndex-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a>r?a=r:a=Math.max(r-o,0),this.focus(this.at(a))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,o=i-r;let a=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;a<i?a=i:a=Math.min(a+o,this.visibleNodes.length-1),this.focus(this.at(a))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=et(e);r&&this.dispatch(Xt(i)),this.dispatch(Fe.only(i)),this.dispatch(Fe.anchor(i)),this.dispatch(Fe.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=et(e);this.dispatch(Fe.remove(n)),he(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(je(e));n&&(this.dispatch(Xt(n.id)),this.dispatch(Fe.add(n.id)),this.dispatch(Fe.anchor(n.id)),this.dispatch(Fe.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=et(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Xt(n)),this.dispatch(Fe.remove(this.nodesBetween(r,i))),this.dispatch(Fe.add(this.nodesBetween(r,je(n)))),this.dispatch(Fe.mostRecent(n)),this.scrollTo(n),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),he(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Xt((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&he(this.props.onFocus,this.focusedNode),he(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(et)),i=je(e.anchor),o=je(e.mostRecent);this.dispatch(Fe.set({ids:r,anchor:i,mostRecent:o})),he(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const o of r)if(!o||!n||o.isInternal&&wf(n,o))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(wn.cursor({type:"none"}))}showCursor(e){this.dispatch(wn.cursor(e))}open(e){const n=je(e);n&&(this.isOpen(n)||(this.dispatch(Yo.open(n,this.isFiltered)),he(this.props.onToggle,n)))}close(e){const n=je(e);n&&this.isOpen(n)&&(this.dispatch(Yo.close(n,this.isFiltered)),he(this.props.onToggle,n))}toggle(e){const n=je(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=je(e);if(!n)return;const r=La(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oi(this.root,e=>{e.isInternal&&e.open()})}closeAll(){oi(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=et(e);return this.openParents(r),Of(()=>r in this.idToIndex).then(()=>{var i;const o=this.idToIndex[r];o!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(o,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===er)return!0;const o=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:o}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!Hn(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!Hn(e,n)}isDragging(e){const n=je(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=je(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Xt(e.id))}onBlur(){this.dispatch(R1())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||e0}get renderRow(){return this.props.renderRow||O1}get renderNode(){return this.props.children||_1}get renderDragPreview(){return this.props.renderDragPreview||kf}get renderCursor(){return this.props.renderCursor||D1}}function we(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var t4=typeof Symbol=="function"&&Symbol.observable||"@@observable",au=t4,So=()=>Math.random().toString(36).substring(7).split("").join("."),n4={INIT:`@@redux/INIT${So()}`,REPLACE:`@@redux/REPLACE${So()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${So()}`},Ot=n4;function n0(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function r4(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(a4(t))return"date";if(o4(t))return"error";const n=i4(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function i4(t){return typeof t.constructor=="function"?t.constructor.name:null}function o4(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function a4(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function dt(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=r4(t)),e}function r0(t,e,n){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?we(2):`Expected the root reducer to be a function. Instead, received: '${dt(t)}'`);if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?we(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?we(1):`Expected the enhancer to be a function. Instead, received: '${dt(n)}'`);return n(r0)(t,e)}let r=t,i=e,o=new Map,a=o,l=0,s=!1;function u(){a===o&&(a=new Map,o.forEach((v,y)=>{a.set(y,v)}))}function c(){if(s)throw new Error(process.env.NODE_ENV==="production"?we(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function h(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?we(4):`Expected the listener to be a function. Instead, received: '${dt(v)}'`);if(s)throw new Error(process.env.NODE_ENV==="production"?we(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let y=!0;u();const C=l++;return a.set(C,v),function(){if(y){if(s)throw new Error(process.env.NODE_ENV==="production"?we(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,u(),a.delete(C),o=null}}}function p(v){if(!n0(v))throw new Error(process.env.NODE_ENV==="production"?we(7):`Actions must be plain objects. Instead, the actual type was: '${dt(v)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?we(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof v.type!="string")throw new Error(process.env.NODE_ENV==="production"?we(17):`Action "type" property must be a string. Instead, the actual type was: '${dt(v.type)}'. Value was: '${v.type}' (stringified)`);if(s)throw new Error(process.env.NODE_ENV==="production"?we(9):"Reducers may not dispatch actions.");try{s=!0,i=r(i,v)}finally{s=!1}return(o=a).forEach(C=>{C()}),v}function g(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?we(10):`Expected the nextReducer to be a function. Instead, received: '${dt(v)}`);r=v,p({type:Ot.REPLACE})}function m(){const v=h;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?we(11):`Expected the observer to be an object. Instead, received: '${dt(y)}'`);function C(){const P=y;P.next&&P.next(c())}return C(),{unsubscribe:v(C)}},[au](){return this}}}return p({type:Ot.INIT}),{dispatch:p,subscribe:h,getState:c,replaceReducer:g,[au]:m}}function lu(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function l4(t,e,n,r){const i=Object.keys(e),o=n&&n.type===Ot.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!n0(t))return`The ${o} has unexpected type of "${dt(t)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const a=Object.keys(t).filter(l=>!e.hasOwnProperty(l)&&!r[l]);if(a.forEach(l=>{r[l]=!0}),!(n&&n.type===Ot.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function s4(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Ot.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?we(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?we(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${Ot.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function su(t){const e=Object.keys(t),n={};for(let a=0;a<e.length;a++){const l=e[a];process.env.NODE_ENV!=="production"&&typeof t[l]>"u"&&lu(`No reducer provided for key "${l}"`),typeof t[l]=="function"&&(n[l]=t[l])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{s4(n)}catch(a){o=a}return function(l={},s){if(o)throw o;if(process.env.NODE_ENV!=="production"){const h=l4(l,n,s,i);h&&lu(h)}let u=!1;const c={};for(let h=0;h<r.length;h++){const p=r[h],g=n[p],m=l[p],f=g(m,s);if(typeof f>"u"){const v=s&&s.type;throw new Error(process.env.NODE_ENV==="production"?we(14):`When called with an action of type ${v?`"${String(v)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}c[p]=f,u=u||f!==m}return u=u||r.length!==Object.keys(l).length,u?c:l}}function u4(t=Cn().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const c4=su({nodes:su({focus:L1,edit:N1,open:M1,selection:A1,drag:u4}),dnd:K1}),d4=Cn();function f4({treeProps:t,imperativeHandle:e,children:n}){const r=d.useRef(null),i=d.useRef(null),o=d.useRef(r0(c4,Cn(t))),a=da.useSyncExternalStore(o.current.subscribe,o.current.getState,()=>d4),l=d.useMemo(()=>new mn(o.current,t,r,i),[]),s=d.useRef(0);return d.useMemo(()=>{s.current+=1,l.update(t)},[...Object.values(t),a.nodes.open]),d.useImperativeHandle(e,()=>l),d.useEffect(()=>{l.props.selection?l.select(l.props.selection,{focus:!1}):l.deselectAll()},[l.props.selection]),d.useEffect(()=>{l.props.searchTerm||o.current.dispatch(Yo.clear(!0))},[l.props.searchTerm]),w.jsx(pf.Provider,{value:l,children:w.jsx(mf.Provider,{value:s.current,children:w.jsx(gf.Provider,{value:a.nodes,children:w.jsx(vf.Provider,{value:a.dnd,children:w.jsx(By,Object.assign({backend:W9,options:{rootElement:l.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function h4(){const t=Oe(),[,e]=Wf(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:o,drop:a}=Qf({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});a&&t.dispatch(wn.hovering(a.parentId,a.index)),r.canDrop()?o&&t.showCursor(o):t.hideCursor()}}),[t]);e(t.listEl)}function p4(t){return h4(),t.children}function g4(){const e=Oe().props.renderContainer||e0;return w.jsx(w.Fragment,{children:w.jsx(e,{})})}function v4(){const t=Oe(),{offset:e,mouse:n,item:r,isDragging:i}=v9(a=>({offset:a.getSourceClientOffset(),mouse:a.getClientOffset(),item:a.getItem(),isDragging:a.isDragging()})),o=t.props.renderDragPreview||kf;return w.jsx(o,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class m4{constructor(e){this.root=y4(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function y4(t){const e=new i0({id:"ROOT"},null);return e.children=t.map(n=>za(n,e)),e}function za(t,e){const n=new i0(t,e);return t.children&&(n.children=t.children.map(r=>za(r,n))),n}class i0{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const o=za(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,o),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let b4=0;function S4(t){const[e,n]=d.useState(t),r=d.useMemo(()=>new m4(e),[e]);return[e,{onMove:u=>{for(const c of u.dragIds)r.move({id:c,parentId:u.parentId,index:u.index});n(r.data)},onRename:({name:u,id:c})=>{r.update({id:c,changes:{name:u}}),n(r.data)},onCreate:({parentId:u,index:c,type:h})=>{const p={id:`simple-tree-id-${b4++}`,name:""};return h==="internal"&&(p.children=[]),r.create({parentId:u,index:c,data:p}),n(r.data),p},onDelete:u=>{u.ids.forEach(c=>r.drop({id:c})),n(r.data)}}]}function C4(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
101
|
+
Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=S4(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function w4(t,e){const n=C4(t);return w.jsxs(f4,{treeProps:n,imperativeHandle:e,children:[w.jsx(p4,{children:w.jsx(g4,{})}),w.jsx(v4,{})]})}const E4=d.forwardRef(w4),o0=({top:t,left:e})=>w.jsx("div",{className:"c__tree-view__cursor",style:{top:t-2,left:e+10,width:`calc(100% - ${24+e}px)`}});function $4(t,e){var n=d.useRef(null),r=d.useRef(null);r.current=e;var i=d.useRef(null);d.useEffect(function(){o()});var o=d.useCallback(function(){var a=i.current,l=r.current,s=a||(l?l instanceof Element?l:l.current:null);n.current&&n.current.element===s&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:s,subscriber:t,cleanup:s?t(s):void 0})},[t]);return d.useEffect(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),d.useCallback(function(a){i.current=a,o()},[o])}function uu(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function x4(t){t===void 0&&(t={});var e=t.onResize,n=d.useRef(void 0);n.current=e;var r=t.round||Math.round,i=d.useRef(),o=d.useState({width:void 0,height:void 0}),a=o[0],l=o[1],s=d.useRef(!1);d.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var u=d.useRef({width:void 0,height:void 0}),c=$4(d.useCallback(function(h){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(p){var g=p[0],m=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",f=uu(g,m,"inlineSize"),v=uu(g,m,"blockSize"),y=f?r(f):void 0,C=v?r(v):void 0;if(u.current.width!==y||u.current.height!==C){var S={width:y,height:C};u.current.width=y,u.current.height=C,n.current?n.current(S):s.current||l(S)}})}),i.current.instance.observe(h,{box:t.box}),function(){i.current&&i.current.instance.unobserve(h)}},[t.box,r]),t.ref);return d.useMemo(function(){return{ref:c,width:a.width,height:a.height}},[c,a.width,a.height])}var Ae=(t=>(t.NODE="node",t.SEPARATOR="separator",t.TITLE="title",t))(Ae||{}),Et=(t=>(t.FIRST_CHILD="first-child",t.LAST_CHILD="last-child",t.LEFT="left",t.RIGHT="right",t))(Et||{});const si=t=>t?t.nodeType===Ae.SEPARATOR:!1,ui=t=>t?t.nodeType===Ae.TITLE:!1,zn=t=>!si(t)&&!ui(t),a0=(t,e,n)=>{const{remove:r,update:i,insert:o,insertBefore:a,insertAfter:l,append:s,prepend:u,getItem:c,move:h,items:p}=Np({initialItems:JSON.parse(JSON.stringify(t)),getKey:_=>_.id,getChildren:_=>_.children||[]}),[g,m]=d.useState(),f=(_=[])=>{const M=p.map(Y=>Y.key);r(...M);const G=JSON.parse(JSON.stringify(_));G.length>0&&o(null,0,...G),m(void 0)},v=_=>{const M=c(_);M&&m(M.value)},y=(_,M,G)=>{var Y;if(_){const L=c(_);L&&o(_,G??((Y=L.children)==null?void 0:Y.length)??0,M)}else o(null,G??p.length,M)},C=_=>{var M;return(M=c(_))==null?void 0:M.value},S=(_,M)=>{var K;const G=c(_);if(!G){console.error("No item found");return}let Y=((K=G.children)==null?void 0:K.map(A=>A.value))??null;const L=M.childrenCount??G.value.childrenCount??0;if((Y==null?void 0:Y.length)===0&&L>0&&(Y=null),M.children&&(Y=[...Y??[],...M.children]),M.children){const A=new Set(M.children.map(z=>z.id));Y=M.children.filter(z=>!A.has(z.id)),Y=[...Y??[],...M.children]}const N={...G.value,...M,children:Y,childrenCount:(Y==null?void 0:Y.length)??L};i(_,N)},P=_=>{r(_)},x=async _=>{if(!e){console.error("No refresh callback provided");return}try{const M=await e(_);S(_,M)}catch(M){console.error("error while refreshing node:",M)}},O=(_,M)=>{o(null,M??p.length,_)},D=(_,M)=>{const G=c(_);if(!G){console.error("No item found");return}const Y={...G.value,children:M,childrenCount:M.length,hasLoadedChildren:M.length>0};i(_,Y)},b=_=>{const M=[],G=c(_);if(!G)return[];M.push(G.value);const Y=L=>{const N=k(L);if(!N)return;const K=c(N);K&&(M.push(K.value),Y(N))};return Y(_),M.reverse()},k=_=>{var M;return((M=c(_))==null?void 0:M.parentKey)??null},V=_=>{const M=k(_);if(!M)return null;const G=c(M);return G?G.value:null},R=(_,M)=>{a(_,M)},H=(_,M)=>{l(_,M)},E=(_,M)=>{s(_,M)},I=(_,M)=>{u(_,M)},j=(_,M,G)=>{h(_,M,G)},W=_=>{j(_.sourceId,_.newParentId,_.index)},Z=async _=>{if(!n)return[];const M=await n(_);return S(_,{children:M,hasLoadedChildren:!0,childrenCount:M.length}),M};return d.useEffect(()=>{const _=M=>{M.forEach(G=>{G.children&&G.children.length>0&&(G.value.children&&(G.value.children=G.children.map(Y=>Y.value),G.value.childrenCount=G.children.length),_(G.children))})};_(p),console.log("treeData",p)},[p]),{nodes:p,addChild:y,updateNode:S,deleteNode:P,addRootNode:O,selectedNode:g,setSelectedNode:m,refreshNode:x,setChildren:D,insertBeforeNode:R,insertAfterNode:H,handleMove:W,prependToNode:I,moveNode:j,appendToNode:E,move:h,resetTree:f,handleLoadChildren:Z,selectNodeById:v,getParent:V,getNode:C,getParentId:k,getAncestors:b}},Va=d.createContext(null),T4=({children:t,onRefresh:e,initialNodeId:n,onLoadChildren:r,initialTreeData:i})=>{const o=d.useRef(null),[a,l]=d.useState(null),[s,u]=d.useState(n??null),c=a0(i??[],e,r);return w.jsx(Va.Provider,{value:{treeApiRef:o,treeData:c,root:a,initialTargetId:s,setInitialTargetId:u,setRoot:l},children:t})},Ba=()=>{const t=d.useContext(Va);if(!t)throw new Error("TreeContext not found");return t},P4=({initialOpenState:t,selectedNodeId:e,rootNodeId:n,renderNode:r,canDrop:i,canDrag:o,afterMove:a})=>{const{ref:l,width:s,height:u}=x4(),c=Ba(),h=(c==null?void 0:c.treeData.nodes)??[],p=m=>{var j,W,Z,_;const f=JSON.parse(JSON.stringify(h)),v=m.dragNodes[0],y=m.parentId?((j=m.parentNode)==null?void 0:j.data.children)??[]:f,C=m.dragNodes[0].data.value.id,S=m.dragNodes[0].data,P=(W=m.parentNode)==null?void 0:W.data;if((P==null?void 0:P.value.nodeType)===Ae.TITLE||(P==null?void 0:P.value.nodeType)===Ae.SEPARATOR)return null;const x=S.parentKey??n,O=m.parentId??n;let D=m.index+0,b=null,k=O;const V=((_=(Z=v.parent)==null?void 0:Z.children)==null?void 0:_.findIndex(M=>M.data.value.id===C))??0;if(x===O){if(V===D)return null;D=D<V?D:D-1}const R=m.index-1,H=y[R],E=m.index,I=y[E];return m.index===0?(k=m.parentId??n,b=Et.FIRST_CHILD):!P&&m.index===1&&!zn(H.value)?(k=n,D=1,b=Et.FIRST_CHILD):m.index===y.length?(k=k??n,b=Et.LAST_CHILD):H&&zn(H.value)?(k=H.value.id,b=Et.RIGHT):I&&zn(I.value)&&(b=Et.LEFT,k=I.value.id),b&&k?{targetModeId:k,mode:b,oldParentId:x,index:D,newParentId:m.parentId,sourceId:C}:null},g=m=>{const f=p(m);f&&(c==null||c.treeData.handleMove(f),a==null||a(f))};if(c)return w.jsx("div",{ref:l,className:"c__tree-view--container",children:w.jsx(E4,{data:h,ref:c.treeApiRef,openByDefault:!1,selectionFollowsFocus:!1,disableMultiSelection:!0,disableEdit:!0,className:"c__tree-view",idAccessor:"key",onMove:g,rowHeight:35,disableDrag:m=>o?!o(m):!1,disableDrop:({parentNode:m,dragNodes:f,index:v})=>{var x,O;if(i&&!i({parentNode:m,dragNodes:f,index:v}))return m.id!=="__REACT_ARBORIST_INTERNAL_ROOT__"&&(m.data.value.canDrop=!1),!0;const y=f[0];if(y&&y.isDragging&&y.willReceiveDrop||((x=m.data.value)==null?void 0:x.nodeType)===Ae.TITLE||((O=m.data.value)==null?void 0:O.nodeType)===Ae.SEPARATOR)return!0;if(m.id==="__REACT_ARBORIST_INTERNAL_ROOT__"){const D=h[v-1],b=h[v],k=h[v+1],V=si(D==null?void 0:D.value),R=si(b==null?void 0:b.value),H=ui(D==null?void 0:D.value),E=ui(b==null?void 0:b.value),I=zn(k==null?void 0:k.value);return!!(v===0&&(R||E)||V&&E&&I||H&&R&&I)}const C=m==null?void 0:m.isOpen,S=(m==null?void 0:m.data.value.childrenCount)&&m.data.value.childrenCount>0||(m==null?void 0:m.data.children)&&m.data.children.length>0;if(!S)return m.data.value.canDrop=!0,!1;let P=m.data.value.childrenCount&&m.data.value.childrenCount>0&&(m==null?void 0:m.data.children)&&m.data.children.length>0;return P=P??!0,!C&&!P&&S?(m.data.value.canDrop=!0,!0):(m.data.value.canDrop=!0,!1)},paddingBottom:30,paddingTop:2,width:s,initialOpenState:t,height:u,overscanCount:20,selection:e,renderCursor:o0,renderRow:D4,rowClassName:"c__tree-view--row",children:r})})},D4=({children:t,...e})=>{const n=e.node.data.value.nodeType===Ae.TITLE,r=e.node.data.value.nodeType===Ae.SEPARATOR,{style:i}=e.attrs,o={...i};return n||r?d.createElement("div",{...e.attrs,key:e.node.id,style:o,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},t):d.createElement("div",{...e.attrs,style:o,key:e.node.id,ref:e.innerRef,onFocus:a=>a.stopPropagation(),onClick:e.node.handleClick},w.jsx("div",{style:{padding:"0 12px",paddingBottom:"100px"},children:t}))},O4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _4(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function I4(t){return"nodeType"in t}function k4(t){var e,n;return t?_4(t)?t:I4(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}const l0=O4?d.useLayoutEffect:d.useEffect;function s0(t){const e=d.useRef(t);return l0(()=>{e.current=t}),d.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function cu(t,e){e===void 0&&(e=[t]);const n=d.useRef(t);return l0(()=>{n.current!==t&&(n.current=t)},e),n}function N4(t){const e=s0(t),n=d.useRef(null),r=d.useCallback(i=>{i!==n.current&&(e==null||e(i,n.current)),n.current=i},[]);return[n,r]}let Co={};function R4(t,e){return d.useMemo(()=>{const n=Co[t]==null?0:Co[t]+1;return Co[t]=n,t+"-"+n},[t,e])}var Wn;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Wn||(Wn={}));function du(){}const L4=Object.freeze({x:0,y:0});function M4(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function A4(t,e,n){const r=M4(e);if(!r)return t;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=t.left-a-(1-i)*parseFloat(n),u=t.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?t.width/i:t.width,h=o?t.height/o:t.height;return{width:c,height:h,top:u,right:s+c,bottom:u+h,left:s}}const K4={ignoreTransform:!1};function u0(t,e){e===void 0&&(e=K4);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:u,transformOrigin:c}=k4(t).getComputedStyle(t);u&&(n=A4(n,u,c))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function fu(t){return u0(t,{ignoreTransform:!0})}var fn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(fn||(fn={}));var hu;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(hu||(hu={}));var ht;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ht||(ht={}));ht.Space,ht.Enter,ht.Esc,ht.Space,ht.Enter,ht.Tab;var pu;(function(t){t[t.RightClick=2]="RightClick"})(pu||(pu={}));var gu;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(gu||(gu={}));var vu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(vu||(vu={}));fn.Backward+"",fn.Forward+"",fn.Backward+"",fn.Forward+"";var ia;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(ia||(ia={}));var oa;(function(t){t.Optimized="optimized"})(oa||(oa={}));function F4(t){let{callback:e,disabled:n}=t;const r=s0(e),i=d.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return d.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}ia.WhileDragging,oa.Optimized;const j4={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:du,draggableNodes:new Map,over:null,measureDroppableContainers:du},H4=d.createContext(j4);({...L4});var mu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(mu||(mu={}));const z4="Droppable",V4={timeout:25};function B4(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:i}=t;const o=R4(z4),{active:a,dispatch:l,over:s,measureDroppableContainers:u}=d.useContext(H4),c=d.useRef({disabled:n}),h=d.useRef(!1),p=d.useRef(null),g=d.useRef(null),{disabled:m,updateMeasurementsFor:f,timeout:v}={...V4,...i},y=cu(f??r),C=d.useCallback(()=>{if(!h.current){h.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),g.current=null},v)},[v]),S=F4({callback:C,disabled:m||!a}),P=d.useCallback((b,k)=>{S&&(k&&(S.unobserve(k),h.current=!1),b&&S.observe(b))},[S]),[x,O]=N4(P),D=cu(e);return d.useEffect(()=>{!S||!x.current||(S.disconnect(),h.current=!1,S.observe(x.current))},[x,S]),d.useEffect(()=>(l({type:Wn.RegisterDroppable,element:{id:r,key:o,disabled:n,node:x,rect:p,data:D}}),()=>l({type:Wn.UnregisterDroppable,key:o,id:r})),[r]),d.useEffect(()=>{n!==c.current.disabled&&(l({type:Wn.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,l]),{active:a,rect:p,isOver:(s==null?void 0:s.id)===r,node:x,over:s,setNodeRef:O}}const W4=t=>{const{isOver:e,setNodeRef:n}=B4({id:t.id,data:t.data});return d.useEffect(()=>{var r;(r=t.onOver)==null||r.call(t,e,t.data)},[e,t.data,t.onOver]),w.jsx("div",{className:"c__dnd--droppable",ref:n,children:t.children})},U4=({children:t,onClick:e,node:n,dragHandle:r,style:i,forceLoading:o})=>{var S,P;const a=Ba(),l=d.useRef(null),[s,u]=d.useState(!1),[c,h]=d.useState(!1),p=o??s,g=n.willReceiveDrop||c,m=n.data.value.childrenCount!==void 0&&n.data.value.childrenCount>0||(((S=n.data.children)==null?void 0:S.length)??0)>0,f=((P=n.children)==null?void 0:P.length)??!1,v=n.isLeaf||!m,y=d.useCallback(async()=>{if(!v){if(f||n.data.value.hasLoadedChildren){n.toggle();return}u(!0),await(a==null?void 0:a.treeData.handleLoadChildren(n.data.value.id)),u(!1),n.open()}},[v,f,n,a==null?void 0:a.treeData]),C=d.useCallback(x=>{x&&!n.isOpen&&!n.isDragging&&(l.current=setTimeout(()=>{y()},500)),l.current&&!x&&clearTimeout(l.current)},[y,n.isOpen,n.isDragging]);return d.useEffect(()=>{C(g)},[g,C]),n.data.value.nodeType===Ae.SEPARATOR?w.jsx("div",{className:"c__tree-view--node__separator"}):n.data.value.nodeType===Ae.TITLE?w.jsx("div",{className:"c__tree-view--node__title",children:n.data.value.headerTitle}):w.jsx(W4,{id:n.id,data:{data:n.data,nodeApi:n},onOver:h,children:w.jsxs("div",{onClick:x=>{x.target.closest(".c__tree-view--node")||x.stopPropagation(),e==null||e()},onKeyDown:x=>{x.stopPropagation()},ref:r,style:i,className:ot("c__tree-view--node",{...n.state,canDrop:n.data.value.canDrop??!0,externalDrop:c}),children:[v&&w.jsx("div",{className:"c__tree-view--node__leaf"}),!v&&w.jsxs(w.Fragment,{children:[p&&w.jsx("div",{className:"c__tree-view--node__loading",children:w.jsx(Pa,{})}),!p&&w.jsx("span",{onClick:x=>{x.stopPropagation(),y()},className:"c__tree-view--node__arrow material-icons",children:n.isOpen?"keyboard_arrow_down":"keyboard_arrow_right"})]}),t]})})};exports.CunninghamProvider=E0;exports.CustomTabs=m1;exports.DropdownMenu=nd;exports.Footer=gg;exports.Header=ld;exports.Hero=vg;exports.HomeGutter=mg;exports.HorizontalSeparator=qo;exports.LaGaufre=Dg;exports.Label=Id;exports.LanguagePicker=ad;exports.LeftPanel=sd;exports.MainLayout=a5;exports.ProConnectButton=Su;exports.QuickSearch=p1;exports.QuickSearchGroup=g1;exports.QuickSearchInput=hf;exports.QuickSearchItem=Lr;exports.QuickSearchItemTemplate=v1;exports.Spinner=Pa;exports.TreeApi=mn;exports.TreeContext=Va;exports.TreeProvider=T4;exports.TreeView=P4;exports.TreeViewItem=U4;exports.TreeViewMoveModeEnum=Et;exports.TreeViewNodeTypeEnum=Ae;exports.TreeViewSeparator=o0;exports.WithLabel=s5;exports.cunninghamConfig=jo;exports.getLocales=bu;exports.headerHeight=l5;exports.isNode=zn;exports.isSeparator=si;exports.isTitle=ui;exports.useDropdownMenu=rd;exports.useResponsive=ar;exports.useTree=a0;exports.useTreeContext=Ba;
|
|
102
102
|
//# sourceMappingURL=index.cjs.map
|