function cN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qk(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Gk={exports:{}},Rm={},Kk={exports:{}},Ye={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ld=Symbol.for("react.element"),uN=Symbol.for("react.portal"),dN=Symbol.for("react.fragment"),fN=Symbol.for("react.strict_mode"),pN=Symbol.for("react.profiler"),hN=Symbol.for("react.provider"),mN=Symbol.for("react.context"),gN=Symbol.for("react.forward_ref"),vN=Symbol.for("react.suspense"),yN=Symbol.for("react.memo"),bN=Symbol.for("react.lazy"),Y4=Symbol.iterator;function wN(e){return e===null||typeof e!="object"?null:(e=Y4&&e[Y4]||e["@@iterator"],typeof e=="function"?e:null)}var Yk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xk=Object.assign,Qk={};function dc(e,t,n){this.props=e,this.context=t,this.refs=Qk,this.updater=n||Yk}dc.prototype.isReactComponent={};dc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};dc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jk(){}Jk.prototype=dc.prototype;function yw(e,t,n){this.props=e,this.context=t,this.refs=Qk,this.updater=n||Yk}var bw=yw.prototype=new Jk;bw.constructor=yw;Xk(bw,dc.prototype);bw.isPureReactComponent=!0;var X4=Array.isArray,Zk=Object.prototype.hasOwnProperty,ww={current:null},e7={key:!0,ref:!0,__self:!0,__source:!0};function t7(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Zk.call(t,r)&&!e7.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Ld,type:e,key:o,ref:a,props:i,_owner:ww.current}}function xN(e,t){return{$$typeof:Ld,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xw(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ld}function SN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Q4=/\/+/g;function U0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SN(""+e.key):t.toString(36)}function jp(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ld:case uN:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+U0(a,0):r,X4(i)?(n="",e!=null&&(n=e.replace(Q4,"$&/")+"/"),jp(i,t,n,"",function(l){return l})):i!=null&&(xw(i)&&(i=xN(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Q4,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",X4(e))for(var s=0;s<e.length;s++){o=e[s];var u=r+U0(o,s);a+=jp(o,t,n,u,i)}else if(u=wN(e),typeof u=="function")for(e=u.call(e),s=0;!(o=e.next()).done;)o=o.value,u=r+U0(o,s++),a+=jp(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function vf(e,t,n){if(e==null)return e;var r=[],i=0;return jp(e,r,"","",function(o){return t.call(n,o,i++)}),r}function CN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rr={current:null},Ep={transition:null},_N={ReactCurrentDispatcher:rr,ReactCurrentBatchConfig:Ep,ReactCurrentOwner:ww};Ye.Children={map:vf,forEach:function(e,t,n){vf(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vf(e,function(){t++}),t},toArray:function(e){return vf(e,function(t){return t})||[]},only:function(e){if(!xw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ye.Component=dc;Ye.Fragment=dN;Ye.Profiler=pN;Ye.PureComponent=yw;Ye.StrictMode=fN;Ye.Suspense=vN;Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_N;Ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Xk({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=ww.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)Zk.call(t,u)&&!e7.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){s=Array(u);for(var l=0;l<u;l++)s[l]=arguments[l+2];r.children=s}return{$$typeof:Ld,type:e.type,key:i,ref:o,props:r,_owner:a}};Ye.createContext=function(e){return e={$$typeof:mN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hN,_context:e},e.Consumer=e};Ye.createElement=t7;Ye.createFactory=function(e){var t=t7.bind(null,e);return t.type=e,t};Ye.createRef=function(){return{current:null}};Ye.forwardRef=function(e){return{$$typeof:gN,render:e}};Ye.isValidElement=xw;Ye.lazy=function(e){return{$$typeof:bN,_payload:{_status:-1,_result:e},_init:CN}};Ye.memo=function(e,t){return{$$typeof:yN,type:e,compare:t===void 0?null:t}};Ye.startTransition=function(e){var t=Ep.transition;Ep.transition={};try{e()}finally{Ep.transition=t}};Ye.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ye.useCallback=function(e,t){return rr.current.useCallback(e,t)};Ye.useContext=function(e){return rr.current.useContext(e)};Ye.useDebugValue=function(){};Ye.useDeferredValue=function(e){return rr.current.useDeferredValue(e)};Ye.useEffect=function(e,t){return rr.current.useEffect(e,t)};Ye.useId=function(){return rr.current.useId()};Ye.useImperativeHandle=function(e,t,n){return rr.current.useImperativeHandle(e,t,n)};Ye.useInsertionEffect=function(e,t){return rr.current.useInsertionEffect(e,t)};Ye.useLayoutEffect=function(e,t){return rr.current.useLayoutEffect(e,t)};Ye.useMemo=function(e,t){return rr.current.useMemo(e,t)};Ye.useReducer=function(e,t,n){return rr.current.useReducer(e,t,n)};Ye.useRef=function(e){return rr.current.useRef(e)};Ye.useState=function(e){return rr.current.useState(e)};Ye.useSyncExternalStore=function(e,t,n){return rr.current.useSyncExternalStore(e,t,n)};Ye.useTransition=function(){return rr.current.useTransition()};Ye.version="18.2.0";Kk.exports=Ye;var h=Kk.exports;const le=nr(h),n7=cN({__proto__:null,default:le},[h]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kN=h,jN=Symbol.for("react.element"),EN=Symbol.for("react.fragment"),RN=Object.prototype.hasOwnProperty,PN=kN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,AN={key:!0,ref:!0,__self:!0,__source:!0};function r7(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)RN.call(t,r)&&!AN.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:jN,type:e,key:o,ref:a,props:i,_owner:PN.current}}Rm.Fragment=EN;Rm.jsx=r7;Rm.jsxs=r7;Gk.exports=Rm;var c=Gk.exports,i7={exports:{}},Kr={},o7={exports:{}},a7={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(H,q){var N=H.length;H.push(q);e:for(;0<N;){var J=N-1>>>1,se=H[J];if(0<i(se,q))H[J]=q,H[N]=se,N=J;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var q=H[0],N=H.pop();if(N!==q){H[0]=N;e:for(var J=0,se=H.length,z=se>>>1;J<z;){var Ce=2*(J+1)-1,Ee=H[Ce],ye=Ce+1,Re=H[ye];if(0>i(Ee,N))ye<se&&0>i(Re,Ee)?(H[J]=Re,H[ye]=N,J=ye):(H[J]=Ee,H[Ce]=N,J=Ce);else if(ye<se&&0>i(Re,N))H[J]=Re,H[ye]=N,J=ye;else break e}}return q}function i(H,q){var N=H.sortIndex-q.sortIndex;return N!==0?N:H.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],d=1,f=null,m=3,g=!1,y=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(H){for(var q=n(l);q!==null;){if(q.callback===null)r(l);else if(q.startTime<=H)r(l),q.sortIndex=q.expirationTime,t(u,q);else break;q=n(l)}}function p(H){if(v=!1,C(H),!y)if(n(u)!==null)y=!0,T(w);else{var q=n(l);q!==null&&V(p,q.startTime-H)}}function w(H,q){y=!1,v&&(v=!1,x(E),E=-1),g=!0;var N=m;try{for(C(q),f=n(u);f!==null&&(!(f.expirationTime>q)||H&&!P());){var J=f.callback;if(typeof J=="function"){f.callback=null,m=f.priorityLevel;var se=J(f.expirationTime<=q);q=e.unstable_now(),typeof se=="function"?f.callback=se:f===n(u)&&r(u),C(q)}else r(u);f=n(u)}if(f!==null)var z=!0;else{var Ce=n(l);Ce!==null&&V(p,Ce.startTime-q),z=!1}return z}finally{f=null,m=N,g=!1}}var b=!1,k=null,E=-1,I=5,j=-1;function P(){return!(e.unstable_now()-j<I)}function B(){if(k!==null){var H=e.unstable_now();j=H;var q=!0;try{q=k(!0,H)}finally{q?W():(b=!1,k=null)}}else b=!1}var W;if(typeof S=="function")W=function(){S(B)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,L=D.port2;D.port1.onmessage=B,W=function(){L.postMessage(null)}}else W=function(){_(B,0)};function T(H){k=H,b||(b=!0,W())}function V(H,q){E=_(function(){H(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,T(w))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(H){switch(m){case 1:case 2:case 3:var q=3;break;default:q=m}var N=m;m=q;try{return H()}finally{m=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var N=m;m=H;try{return q()}finally{m=N}},e.unstable_scheduleCallback=function(H,q,N){var J=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?J+N:J):N=J,H){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=N+se,H={id:d++,callback:q,priorityLevel:H,startTime:N,expirationTime:se,sortIndex:-1},N>J?(H.sortIndex=N,t(l,H),n(u)===null&&H===n(l)&&(v?(x(E),E=-1):v=!0,V(p,N-J))):(H.sortIndex=se,t(u,H),y||g||(y=!0,T(w))),H},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(H){var q=m;return function(){var N=m;m=q;try{return H.apply(this,arguments)}finally{m=N}}}})(a7);o7.exports=a7;var IN=o7.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var s7=h,Vr=IN;function ce(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l7=new Set,Wu={};function Ds(e,t){Kl(e,t),Kl(e+"Capture",t)}function Kl(e,t){for(Wu[e]=t,e=0;e<t.length;e++)l7.add(t[e])}var Ro=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_y=Object.prototype.hasOwnProperty,TN=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,J4={},Z4={};function ON(e){return _y.call(Z4,e)?!0:_y.call(J4,e)?!1:TN.test(e)?Z4[e]=!0:(J4[e]=!0,!1)}function DN(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NN(e,t,n,r){if(t===null||typeof t>"u"||DN(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ir(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var On={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){On[e]=new ir(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];On[t]=new ir(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){On[e]=new ir(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){On[e]=new ir(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){On[e]=new ir(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){On[e]=new ir(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){On[e]=new ir(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){On[e]=new ir(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){On[e]=new ir(e,5,!1,e.toLowerCase(),null,!1,!1)});var Sw=/[\-:]([a-z])/g;function Cw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Sw,Cw);On[t]=new ir(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Sw,Cw);On[t]=new ir(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Sw,Cw);On[t]=new ir(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){On[e]=new ir(e,1,!1,e.toLowerCase(),null,!1,!1)});On.xlinkHref=new ir("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){On[e]=new ir(e,1,!1,e.toLowerCase(),null,!0,!0)});function _w(e,t,n,r){var i=On.hasOwnProperty(t)?On[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(NN(t,n,i,r)&&(n=null),r||i===null?ON(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Mo=s7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yf=Symbol.for("react.element"),vl=Symbol.for("react.portal"),yl=Symbol.for("react.fragment"),kw=Symbol.for("react.strict_mode"),ky=Symbol.for("react.profiler"),c7=Symbol.for("react.provider"),u7=Symbol.for("react.context"),jw=Symbol.for("react.forward_ref"),jy=Symbol.for("react.suspense"),Ey=Symbol.for("react.suspense_list"),Ew=Symbol.for("react.memo"),na=Symbol.for("react.lazy"),d7=Symbol.for("react.offscreen"),e6=Symbol.iterator;function Hc(e){return e===null||typeof e!="object"?null:(e=e6&&e[e6]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Object.assign,W0;function du(e){if(W0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);W0=t&&t[1]||""}return`
`+W0+e}var V0=!1;function q0(e,t){if(!e||V0)return"";V0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var i=l.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var u=`
`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{V0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?du(e):""}function MN(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=q0(e.type,!1),e;case 11:return e=q0(e.type.render,!1),e;case 1:return e=q0(e.type,!0),e;default:return""}}function Ry(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yl:return"Fragment";case vl:return"Portal";case ky:return"Profiler";case kw:return"StrictMode";case jy:return"Suspense";case Ey:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u7:return(e.displayName||"Context")+".Consumer";case c7:return(e._context.displayName||"Context")+".Provider";case jw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ew:return t=e.displayName||null,t!==null?t:Ry(e.type)||"Memo";case na:t=e._payload,e=e._init;try{return Ry(e(t))}catch{}}return null}function $N(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ry(t);case 8:return t===kw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ka(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function f7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LN(e){var t=f7(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bf(e){e._valueTracker||(e._valueTracker=LN(e))}function p7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=f7(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Py(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function t6(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ka(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function h7(e,t){t=t.checked,t!=null&&_w(e,"checked",t,!1)}function Ay(e,t){h7(e,t);var n=ka(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Iy(e,t.type,n):t.hasOwnProperty("defaultValue")&&Iy(e,t.type,ka(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function n6(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Iy(e,t,n){(t!=="number"||dh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fu=Array.isArray;function Tl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ka(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ty(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ce(91));return Lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function r6(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ce(92));if(fu(n)){if(1<n.length)throw Error(ce(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ka(n)}}function m7(e,t){var n=ka(t.value),r=ka(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function i6(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function g7(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Oy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?g7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wf,v7=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wf=wf||document.createElement("div"),wf.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},FN=["Webkit","ms","Moz","O"];Object.keys(wu).forEach(function(e){FN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wu[t]=wu[e]})});function y7(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wu.hasOwnProperty(e)&&wu[e]?(""+t).trim():t+"px"}function b7(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=y7(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var zN=Lt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dy(e,t){if(t){if(zN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function Ny(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var My=null;function Rw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $y=null,Ol=null,Dl=null;function o6(e){if(e=Bd(e)){if(typeof $y!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=Om(t),$y(e.stateNode,e.type,t))}}function w7(e){Ol?Dl?Dl.push(e):Dl=[e]:Ol=e}function x7(){if(Ol){var e=Ol,t=Dl;if(Dl=Ol=null,o6(e),t)for(e=0;e<t.length;e++)o6(t[e])}}function S7(e,t){return e(t)}function C7(){}var G0=!1;function _7(e,t,n){if(G0)return e(t,n);G0=!0;try{return S7(e,t,n)}finally{G0=!1,(Ol!==null||Dl!==null)&&(C7(),x7())}}function qu(e,t){var n=e.stateNode;if(n===null)return null;var r=Om(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ce(231,t,typeof n));return n}var Ly=!1;if(Ro)try{var Uc={};Object.defineProperty(Uc,"passive",{get:function(){Ly=!0}}),window.addEventListener("test",Uc,Uc),window.removeEventListener("test",Uc,Uc)}catch{Ly=!1}function BN(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(d){this.onError(d)}}var xu=!1,fh=null,ph=!1,Fy=null,HN={onError:function(e){xu=!0,fh=e}};function UN(e,t,n,r,i,o,a,s,u){xu=!1,fh=null,BN.apply(HN,arguments)}function WN(e,t,n,r,i,o,a,s,u){if(UN.apply(this,arguments),xu){if(xu){var l=fh;xu=!1,fh=null}else throw Error(ce(198));ph||(ph=!0,Fy=l)}}function Ns(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function k7(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function a6(e){if(Ns(e)!==e)throw Error(ce(188))}function VN(e){var t=e.alternate;if(!t){if(t=Ns(e),t===null)throw Error(ce(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return a6(i),e;if(o===r)return a6(i),t;o=o.sibling}throw Error(ce(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(ce(189))}}if(n.alternate!==r)throw Error(ce(190))}if(n.tag!==3)throw Error(ce(188));return n.stateNode.current===n?e:t}function j7(e){return e=VN(e),e!==null?E7(e):null}function E7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=E7(e);if(t!==null)return t;e=e.sibling}return null}var R7=Vr.unstable_scheduleCallback,s6=Vr.unstable_cancelCallback,qN=Vr.unstable_shouldYield,GN=Vr.unstable_requestPaint,Yt=Vr.unstable_now,KN=Vr.unstable_getCurrentPriorityLevel,Pw=Vr.unstable_ImmediatePriority,P7=Vr.unstable_UserBlockingPriority,hh=Vr.unstable_NormalPriority,YN=Vr.unstable_LowPriority,A7=Vr.unstable_IdlePriority,Pm=null,no=null;function XN(e){if(no&&typeof no.onCommitFiberRoot=="function")try{no.onCommitFiberRoot(Pm,e,void 0,(e.current.flags&128)===128)}catch{}}var $i=Math.clz32?Math.clz32:ZN,QN=Math.log,JN=Math.LN2;function ZN(e){return e>>>=0,e===0?32:31-(QN(e)/JN|0)|0}var xf=64,Sf=4194304;function pu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=pu(s):(o&=a,o!==0&&(r=pu(o)))}else a=n&~i,a!==0?r=pu(a):o!==0&&(r=pu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-$i(t),i=1<<n,r|=e[n],t&=~i;return r}function eM(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tM(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-$i(o),s=1<<a,u=i[a];u===-1?(!(s&n)||s&r)&&(i[a]=eM(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}function zy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function I7(){var e=xf;return xf<<=1,!(xf&4194240)&&(xf=64),e}function K0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$i(t),e[t]=n}function nM(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-$i(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Aw(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$i(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var st=0;function T7(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var O7,Iw,D7,N7,M7,By=!1,Cf=[],pa=null,ha=null,ma=null,Gu=new Map,Ku=new Map,oa=[],rM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function l6(e,t){switch(e){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":Gu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ku.delete(t.pointerId)}}function Wc(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Bd(t),t!==null&&Iw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function iM(e,t,n,r,i){switch(t){case"focusin":return pa=Wc(pa,e,t,n,r,i),!0;case"dragenter":return ha=Wc(ha,e,t,n,r,i),!0;case"mouseover":return ma=Wc(ma,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Gu.set(o,Wc(Gu.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ku.set(o,Wc(Ku.get(o)||null,e,t,n,r,i)),!0}return!1}function $7(e){var t=os(e.target);if(t!==null){var n=Ns(t);if(n!==null){if(t=n.tag,t===13){if(t=k7(n),t!==null){e.blockedOn=t,M7(e.priority,function(){D7(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);My=r,n.target.dispatchEvent(r),My=null}else return t=Bd(n),t!==null&&Iw(t),e.blockedOn=n,!1;t.shift()}return!0}function c6(e,t,n){Rp(e)&&n.delete(t)}function oM(){By=!1,pa!==null&&Rp(pa)&&(pa=null),ha!==null&&Rp(ha)&&(ha=null),ma!==null&&Rp(ma)&&(ma=null),Gu.forEach(c6),Ku.forEach(c6)}function Vc(e,t){e.blockedOn===t&&(e.blockedOn=null,By||(By=!0,Vr.unstable_scheduleCallback(Vr.unstable_NormalPriority,oM)))}function Yu(e){function t(i){return Vc(i,e)}if(0<Cf.length){Vc(Cf[0],e);for(var n=1;n<Cf.length;n++){var r=Cf[n];r.blockedOn===e&&(r.blockedOn=null)}}for(pa!==null&&Vc(pa,e),ha!==null&&Vc(ha,e),ma!==null&&Vc(ma,e),Gu.forEach(t),Ku.forEach(t),n=0;n<oa.length;n++)r=oa[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<oa.length&&(n=oa[0],n.blockedOn===null);)$7(n),n.blockedOn===null&&oa.shift()}var Nl=Mo.ReactCurrentBatchConfig,gh=!0;function aM(e,t,n,r){var i=st,o=Nl.transition;Nl.transition=null;try{st=1,Tw(e,t,n,r)}finally{st=i,Nl.transition=o}}function sM(e,t,n,r){var i=st,o=Nl.transition;Nl.transition=null;try{st=4,Tw(e,t,n,r)}finally{st=i,Nl.transition=o}}function Tw(e,t,n,r){if(gh){var i=Hy(e,t,n,r);if(i===null)iv(e,t,r,vh,n),l6(e,r);else if(iM(i,e,t,n,r))r.stopPropagation();else if(l6(e,r),t&4&&-1<rM.indexOf(e)){for(;i!==null;){var o=Bd(i);if(o!==null&&O7(o),o=Hy(e,t,n,r),o===null&&iv(e,t,r,vh,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else iv(e,t,r,null,n)}}var vh=null;function Hy(e,t,n,r){if(vh=null,e=Rw(r),e=os(e),e!==null)if(t=Ns(e),t===null)e=null;else if(n=t.tag,n===13){if(e=k7(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return vh=e,null}function L7(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(KN()){case Pw:return 1;case P7:return 4;case hh:case YN:return 16;case A7:return 536870912;default:return 16}default:return 16}}var la=null,Ow=null,Pp=null;function F7(){if(Pp)return Pp;var e,t=Ow,n=t.length,r,i="value"in la?la.value:la.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Pp=i.slice(e,1<r?1-r:void 0)}function Ap(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _f(){return!0}function u6(){return!1}function Yr(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?_f:u6,this.isPropagationStopped=u6,this}return Lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=_f)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_f)},persist:function(){},isPersistent:_f}),t}var fc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dw=Yr(fc),zd=Lt({},fc,{view:0,detail:0}),lM=Yr(zd),Y0,X0,qc,Am=Lt({},zd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nw,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qc&&(qc&&e.type==="mousemove"?(Y0=e.screenX-qc.screenX,X0=e.screenY-qc.screenY):X0=Y0=0,qc=e),Y0)},movementY:function(e){return"movementY"in e?e.movementY:X0}}),d6=Yr(Am),cM=Lt({},Am,{dataTransfer:0}),uM=Yr(cM),dM=Lt({},zd,{relatedTarget:0}),Q0=Yr(dM),fM=Lt({},fc,{animationName:0,elapsedTime:0,pseudoElement:0}),pM=Yr(fM),hM=Lt({},fc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mM=Yr(hM),gM=Lt({},fc,{data:0}),f6=Yr(gM),vM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wM(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bM[e])?!!t[e]:!1}function Nw(){return wM}var xM=Lt({},zd,{key:function(e){if(e.key){var t=vM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ap(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nw,charCode:function(e){return e.type==="keypress"?Ap(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ap(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SM=Yr(xM),CM=Lt({},Am,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),p6=Yr(CM),_M=Lt({},zd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nw}),kM=Yr(_M),jM=Lt({},fc,{propertyName:0,elapsedTime:0,pseudoElement:0}),EM=Yr(jM),RM=Lt({},Am,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),PM=Yr(RM),AM=[9,13,27,32],Mw=Ro&&"CompositionEvent"in window,Su=null;Ro&&"documentMode"in document&&(Su=document.documentMode);var IM=Ro&&"TextEvent"in window&&!Su,z7=Ro&&(!Mw||Su&&8<Su&&11>=Su),h6=" ",m6=!1;function B7(e,t){switch(e){case"keyup":return AM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function TM(e,t){switch(e){case"compositionend":return H7(t);case"keypress":return t.which!==32?null:(m6=!0,h6);case"textInput":return e=t.data,e===h6&&m6?null:e;default:return null}}function OM(e,t){if(bl)return e==="compositionend"||!Mw&&B7(e,t)?(e=F7(),Pp=Ow=la=null,bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return z7&&t.locale!=="ko"?null:t.data;default:return null}}var DM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function g6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!DM[e.type]:t==="textarea"}function U7(e,t,n,r){w7(r),t=yh(t,"onChange"),0<t.length&&(n=new Dw("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cu=null,Xu=null;function NM(e){ej(e,0)}function Im(e){var t=Sl(e);if(p7(t))return e}function MM(e,t){if(e==="change")return t}var W7=!1;if(Ro){var J0;if(Ro){var Z0="oninput"in document;if(!Z0){var v6=document.createElement("div");v6.setAttribute("oninput","return;"),Z0=typeof v6.oninput=="function"}J0=Z0}else J0=!1;W7=J0&&(!document.documentMode||9<document.documentMode)}function y6(){Cu&&(Cu.detachEvent("onpropertychange",V7),Xu=Cu=null)}function V7(e){if(e.propertyName==="value"&&Im(Xu)){var t=[];U7(t,Xu,e,Rw(e)),_7(NM,t)}}function $M(e,t,n){e==="focusin"?(y6(),Cu=t,Xu=n,Cu.attachEvent("onpropertychange",V7)):e==="focusout"&&y6()}function LM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Im(Xu)}function FM(e,t){if(e==="click")return Im(t)}function zM(e,t){if(e==="input"||e==="change")return Im(t)}function BM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hi=typeof Object.is=="function"?Object.is:BM;function Qu(e,t){if(Hi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!_y.call(t,i)||!Hi(e[i],t[i]))return!1}return!0}function b6(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function w6(e,t){var n=b6(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=b6(n)}}function q7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?q7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function G7(){for(var e=window,t=dh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=dh(e.document)}return t}function $w(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function HM(e){var t=G7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&q7(n.ownerDocument.documentElement,n)){if(r!==null&&$w(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=w6(n,o);var a=w6(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var UM=Ro&&"documentMode"in document&&11>=document.documentMode,wl=null,Uy=null,_u=null,Wy=!1;function x6(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wy||wl==null||wl!==dh(r)||(r=wl,"selectionStart"in r&&$w(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_u&&Qu(_u,r)||(_u=r,r=yh(Uy,"onSelect"),0<r.length&&(t=new Dw("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wl)))}function kf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xl={animationend:kf("Animation","AnimationEnd"),animationiteration:kf("Animation","AnimationIteration"),animationstart:kf("Animation","AnimationStart"),transitionend:kf("Transition","TransitionEnd")},ev={},K7={};Ro&&(K7=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Tm(e){if(ev[e])return ev[e];if(!xl[e])return e;var t=xl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in K7)return ev[e]=t[n];return e}var Y7=Tm("animationend"),X7=Tm("animationiteration"),Q7=Tm("animationstart"),J7=Tm("transitionend"),Z7=new Map,S6="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $a(e,t){Z7.set(e,t),Ds(t,[e])}for(var tv=0;tv<S6.length;tv++){var nv=S6[tv],WM=nv.toLowerCase(),VM=nv[0].toUpperCase()+nv.slice(1);$a(WM,"on"+VM)}$a(Y7,"onAnimationEnd");$a(X7,"onAnimationIteration");$a(Q7,"onAnimationStart");$a("dblclick","onDoubleClick");$a("focusin","onFocus");$a("focusout","onBlur");$a(J7,"onTransitionEnd");Kl("onMouseEnter",["mouseout","mouseover"]);Kl("onMouseLeave",["mouseout","mouseover"]);Kl("onPointerEnter",["pointerout","pointerover"]);Kl("onPointerLeave",["pointerout","pointerover"]);Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qM=new Set("cancel close invalid load scroll toggle".split(" ").concat(hu));function C6(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,WN(r,t,void 0,e),e.currentTarget=null}function ej(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;C6(i,s,l),o=u}else for(a=0;a<r.length;a++){if(s=r[a],u=s.instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;C6(i,s,l),o=u}}}if(ph)throw e=Fy,ph=!1,Fy=null,e}function Ct(e,t){var n=t[Yy];n===void 0&&(n=t[Yy]=new Set);var r=e+"__bubble";n.has(r)||(tj(t,e,2,!1),n.add(r))}function rv(e,t,n){var r=0;t&&(r|=4),tj(n,e,r,t)}var jf="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[jf]){e[jf]=!0,l7.forEach(function(n){n!=="selectionchange"&&(qM.has(n)||rv(n,!1,e),rv(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jf]||(t[jf]=!0,rv("selectionchange",!1,t))}}function tj(e,t,n,r){switch(L7(t)){case 1:var i=aM;break;case 4:i=sM;break;default:i=Tw}n=i.bind(null,t,n,e),i=void 0,!Ly||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function iv(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;a=a.return}for(;s!==null;){if(a=os(s),a===null)return;if(u=a.tag,u===5||u===6){r=o=a;continue e}s=s.parentNode}}r=r.return}_7(function(){var l=o,d=Rw(n),f=[];e:{var m=Z7.get(e);if(m!==void 0){var g=Dw,y=e;switch(e){case"keypress":if(Ap(n)===0)break e;case"keydown":case"keyup":g=SM;break;case"focusin":y="focus",g=Q0;break;case"focusout":y="blur",g=Q0;break;case"beforeblur":case"afterblur":g=Q0;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=d6;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=uM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=kM;break;case Y7:case X7:case Q7:g=pM;break;case J7:g=EM;break;case"scroll":g=lM;break;case"wheel":g=PM;break;case"copy":case"cut":case"paste":g=mM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=p6}var v=(t&4)!==0,_=!v&&e==="scroll",x=v?m!==null?m+"Capture":null:m;v=[];for(var S=l,C;S!==null;){C=S;var p=C.stateNode;if(C.tag===5&&p!==null&&(C=p,x!==null&&(p=qu(S,x),p!=null&&v.push(Zu(S,p,C)))),_)break;S=S.return}0<v.length&&(m=new g(m,y,null,n,d),f.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&n!==My&&(y=n.relatedTarget||n.fromElement)&&(os(y)||y[Po]))break e;if((g||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=l,y=y?os(y):null,y!==null&&(_=Ns(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=l),g!==y)){if(v=d6,p="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(v=p6,p="onPointerLeave",x="onPointerEnter",S="pointer"),_=g==null?m:Sl(g),C=y==null?m:Sl(y),m=new v(p,S+"leave",g,n,d),m.target=_,m.relatedTarget=C,p=null,os(d)===l&&(v=new v(x,S+"enter",y,n,d),v.target=C,v.relatedTarget=_,p=v),_=p,g&&y)t:{for(v=g,x=y,S=0,C=v;C;C=Zs(C))S++;for(C=0,p=x;p;p=Zs(p))C++;for(;0<S-C;)v=Zs(v),S--;for(;0<C-S;)x=Zs(x),C--;for(;S--;){if(v===x||x!==null&&v===x.alternate)break t;v=Zs(v),x=Zs(x)}v=null}else v=null;g!==null&&_6(f,m,g,v,!1),y!==null&&_!==null&&_6(f,_,y,v,!0)}}e:{if(m=l?Sl(l):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var w=MM;else if(g6(m))if(W7)w=zM;else{w=LM;var b=$M}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(w=FM);if(w&&(w=w(e,l))){U7(f,w,n,d);break e}b&&b(e,m,l),e==="focusout"&&(b=m._wrapperState)&&b.controlled&&m.type==="number"&&Iy(m,"number",m.value)}switch(b=l?Sl(l):window,e){case"focusin":(g6(b)||b.contentEditable==="true")&&(wl=b,Uy=l,_u=null);break;case"focusout":_u=Uy=wl=null;break;case"mousedown":Wy=!0;break;case"contextmenu":case"mouseup":case"dragend":Wy=!1,x6(f,n,d);break;case"selectionchange":if(UM)break;case"keydown":case"keyup":x6(f,n,d)}var k;if(Mw)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else bl?B7(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(z7&&n.locale!=="ko"&&(bl||E!=="onCompositionStart"?E==="onCompositionEnd"&&bl&&(k=F7()):(la=d,Ow="value"in la?la.value:la.textContent,bl=!0)),b=yh(l,E),0<b.length&&(E=new f6(E,e,null,n,d),f.push({event:E,listeners:b}),k?E.data=k:(k=H7(n),k!==null&&(E.data=k)))),(k=IM?TM(e,n):OM(e,n))&&(l=yh(l,"onBeforeInput"),0<l.length&&(d=new f6("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:l}),d.data=k))}ej(f,t)})}function Zu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yh(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=qu(e,n),o!=null&&r.unshift(Zu(e,o,i)),o=qu(e,t),o!=null&&r.push(Zu(e,o,i))),e=e.return}return r}function Zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _6(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=qu(n,o),u!=null&&a.unshift(Zu(n,u,s))):i||(u=qu(n,o),u!=null&&a.push(Zu(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var GM=/\r\n?/g,KM=/\u0000|\uFFFD/g;function k6(e){return(typeof e=="string"?e:""+e).replace(GM,`
`).replace(KM,"")}function Ef(e,t,n){if(t=k6(t),k6(e)!==t&&n)throw Error(ce(425))}function bh(){}var Vy=null,qy=null;function Gy(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ky=typeof setTimeout=="function"?setTimeout:void 0,YM=typeof clearTimeout=="function"?clearTimeout:void 0,j6=typeof Promise=="function"?Promise:void 0,XM=typeof queueMicrotask=="function"?queueMicrotask:typeof j6<"u"?function(e){return j6.resolve(null).then(e).catch(QM)}:Ky;function QM(e){setTimeout(function(){throw e})}function ov(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Yu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Yu(t)}function ga(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function E6(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var pc=Math.random().toString(36).slice(2),Zi="__reactFiber$"+pc,ed="__reactProps$"+pc,Po="__reactContainer$"+pc,Yy="__reactEvents$"+pc,JM="__reactListeners$"+pc,ZM="__reactHandles$"+pc;function os(e){var t=e[Zi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Po]||n[Zi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=E6(e);e!==null;){if(n=e[Zi])return n;e=E6(e)}return t}e=n,n=e.parentNode}return null}function Bd(e){return e=e[Zi]||e[Po],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ce(33))}function Om(e){return e[ed]||null}var Xy=[],Cl=-1;function La(e){return{current:e}}function jt(e){0>Cl||(e.current=Xy[Cl],Xy[Cl]=null,Cl--)}function yt(e,t){Cl++,Xy[Cl]=e.current,e.current=t}var ja={},Un=La(ja),yr=La(!1),ys=ja;function Yl(e,t){var n=e.type.contextTypes;if(!n)return ja;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function br(e){return e=e.childContextTypes,e!=null}function wh(){jt(yr),jt(Un)}function R6(e,t,n){if(Un.current!==ja)throw Error(ce(168));yt(Un,t),yt(yr,n)}function nj(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ce(108,$N(e)||"Unknown",i));return Lt({},n,r)}function xh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ja,ys=Un.current,yt(Un,e),yt(yr,yr.current),!0}function P6(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=nj(e,t,ys),r.__reactInternalMemoizedMergedChildContext=e,jt(yr),jt(Un),yt(Un,e)):jt(yr),yt(yr,n)}var So=null,Dm=!1,av=!1;function rj(e){So===null?So=[e]:So.push(e)}function e$(e){Dm=!0,rj(e)}function Fa(){if(!av&&So!==null){av=!0;var e=0,t=st;try{var n=So;for(st=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}So=null,Dm=!1}catch(i){throw So!==null&&(So=So.slice(e+1)),R7(Pw,Fa),i}finally{st=t,av=!1}}return null}var _l=[],kl=0,Sh=null,Ch=0,ai=[],si=0,bs=null,Co=1,_o="";function Ja(e,t){_l[kl++]=Ch,_l[kl++]=Sh,Sh=e,Ch=t}function ij(e,t,n){ai[si++]=Co,ai[si++]=_o,ai[si++]=bs,bs=e;var r=Co;e=_o;var i=32-$i(r)-1;r&=~(1<<i),n+=1;var o=32-$i(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Co=1<<32-$i(t)+i|n<<i|r,_o=o+e}else Co=1<<o|n<<i|r,_o=e}function Lw(e){e.return!==null&&(Ja(e,1),ij(e,1,0))}function Fw(e){for(;e===Sh;)Sh=_l[--kl],_l[kl]=null,Ch=_l[--kl],_l[kl]=null;for(;e===bs;)bs=ai[--si],ai[si]=null,_o=ai[--si],ai[si]=null,Co=ai[--si],ai[si]=null}var Br=null,Fr=null,Pt=!1,Oi=null;function oj(e,t){var n=ui(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function A6(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Br=e,Fr=ga(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Br=e,Fr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bs!==null?{id:Co,overflow:_o}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ui(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Br=e,Fr=null,!0):!1;default:return!1}}function Qy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jy(e){if(Pt){var t=Fr;if(t){var n=t;if(!A6(e,t)){if(Qy(e))throw Error(ce(418));t=ga(n.nextSibling);var r=Br;t&&A6(e,t)?oj(r,n):(e.flags=e.flags&-4097|2,Pt=!1,Br=e)}}else{if(Qy(e))throw Error(ce(418));e.flags=e.flags&-4097|2,Pt=!1,Br=e}}}function I6(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Br=e}function Rf(e){if(e!==Br)return!1;if(!Pt)return I6(e),Pt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gy(e.type,e.memoizedProps)),t&&(t=Fr)){if(Qy(e))throw aj(),Error(ce(418));for(;t;)oj(e,t),t=ga(t.nextSibling)}if(I6(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Fr=ga(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fr=null}}else Fr=Br?ga(e.stateNode.nextSibling):null;return!0}function aj(){for(var e=Fr;e;)e=ga(e.nextSibling)}function Xl(){Fr=Br=null,Pt=!1}function zw(e){Oi===null?Oi=[e]:Oi.push(e)}var t$=Mo.ReactCurrentBatchConfig;function Ai(e,t){if(e&&e.defaultProps){t=Lt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var _h=La(null),kh=null,jl=null,Bw=null;function Hw(){Bw=jl=kh=null}function Uw(e){var t=_h.current;jt(_h),e._currentValue=t}function Zy(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ml(e,t){kh=e,Bw=jl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gr=!0),e.firstContext=null)}function hi(e){var t=e._currentValue;if(Bw!==e)if(e={context:e,memoizedValue:t,next:null},jl===null){if(kh===null)throw Error(ce(308));jl=e,kh.dependencies={lanes:0,firstContext:e}}else jl=jl.next=e;return t}var as=null;function Ww(e){as===null?as=[e]:as.push(e)}function sj(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ww(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ao(e,r)}function Ao(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ra=!1;function Vw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ko(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,tt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ao(e,n)}return i=r.interleaved,i===null?(t.next=t,Ww(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ao(e,n)}function Ip(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Aw(e,n)}}function T6(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jh(e,t,n,r){var i=e.updateQueue;ra=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,d=l=u=null,s=o;do{var m=s.lane,g=s.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,v=s;switch(m=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(g,f,m);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,m=typeof y=="function"?y.call(g,f,m):y,m==null)break e;f=Lt({},f,m);break e;case 2:ra=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else g={eventTime:g,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(l=d=g,u=f):d=d.next=g,a|=m;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(d===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);xs|=a,e.lanes=a,e.memoizedState=f}}function O6(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(ce(191,i));i.call(r)}}}var cj=new s7.Component().refs;function eb(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nm={isMounted:function(e){return(e=e._reactInternals)?Ns(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=er(),i=ba(e),o=ko(r,i);o.payload=t,n!=null&&(o.callback=n),t=va(e,o,i),t!==null&&(Li(t,e,i,r),Ip(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=er(),i=ba(e),o=ko(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=va(e,o,i),t!==null&&(Li(t,e,i,r),Ip(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=er(),r=ba(e),i=ko(n,r);i.tag=2,t!=null&&(i.callback=t),t=va(e,i,r),t!==null&&(Li(t,e,r,n),Ip(t,e,r))}};function D6(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Qu(n,r)||!Qu(i,o):!0}function uj(e,t,n){var r=!1,i=ja,o=t.contextType;return typeof o=="object"&&o!==null?o=hi(o):(i=br(t)?ys:Un.current,r=t.contextTypes,o=(r=r!=null)?Yl(e,i):ja),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nm,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function N6(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Nm.enqueueReplaceState(t,t.state,null)}function tb(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=cj,Vw(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=hi(o):(o=br(t)?ys:Un.current,i.context=Yl(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(eb(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Nm.enqueueReplaceState(i,i.state,null),jh(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Gc(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ce(309));var r=n.stateNode}if(!r)throw Error(ce(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===cj&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(ce(284));if(!n._owner)throw Error(ce(290,e))}return e}function Pf(e,t){throw e=Object.prototype.toString.call(t),Error(ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function M6(e){var t=e._init;return t(e._payload)}function dj(e){function t(x,S){if(e){var C=x.deletions;C===null?(x.deletions=[S],x.flags|=16):C.push(S)}}function n(x,S){if(!e)return null;for(;S!==null;)t(x,S),S=S.sibling;return null}function r(x,S){for(x=new Map;S!==null;)S.key!==null?x.set(S.key,S):x.set(S.index,S),S=S.sibling;return x}function i(x,S){return x=wa(x,S),x.index=0,x.sibling=null,x}function o(x,S,C){return x.index=C,e?(C=x.alternate,C!==null?(C=C.index,C<S?(x.flags|=2,S):C):(x.flags|=2,S)):(x.flags|=1048576,S)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,S,C,p){return S===null||S.tag!==6?(S=pv(C,x.mode,p),S.return=x,S):(S=i(S,C),S.return=x,S)}function u(x,S,C,p){var w=C.type;return w===yl?d(x,S,C.props.children,p,C.key):S!==null&&(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===na&&M6(w)===S.type)?(p=i(S,C.props),p.ref=Gc(x,S,C),p.return=x,p):(p=$p(C.type,C.key,C.props,null,x.mode,p),p.ref=Gc(x,S,C),p.return=x,p)}function l(x,S,C,p){return S===null||S.tag!==4||S.stateNode.containerInfo!==C.containerInfo||S.stateNode.implementation!==C.implementation?(S=hv(C,x.mode,p),S.return=x,S):(S=i(S,C.children||[]),S.return=x,S)}function d(x,S,C,p,w){return S===null||S.tag!==7?(S=ps(C,x.mode,p,w),S.return=x,S):(S=i(S,C),S.return=x,S)}function f(x,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return S=pv(""+S,x.mode,C),S.return=x,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case yf:return C=$p(S.type,S.key,S.props,null,x.mode,C),C.ref=Gc(x,null,S),C.return=x,C;case vl:return S=hv(S,x.mode,C),S.return=x,S;case na:var p=S._init;return f(x,p(S._payload),C)}if(fu(S)||Hc(S))return S=ps(S,x.mode,C,null),S.return=x,S;Pf(x,S)}return null}function m(x,S,C,p){var w=S!==null?S.key:null;if(typeof C=="string"&&C!==""||typeof C=="number")return w!==null?null:s(x,S,""+C,p);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case yf:return C.key===w?u(x,S,C,p):null;case vl:return C.key===w?l(x,S,C,p):null;case na:return w=C._init,m(x,S,w(C._payload),p)}if(fu(C)||Hc(C))return w!==null?null:d(x,S,C,p,null);Pf(x,C)}return null}function g(x,S,C,p,w){if(typeof p=="string"&&p!==""||typeof p=="number")return x=x.get(C)||null,s(S,x,""+p,w);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case yf:return x=x.get(p.key===null?C:p.key)||null,u(S,x,p,w);case vl:return x=x.get(p.key===null?C:p.key)||null,l(S,x,p,w);case na:var b=p._init;return g(x,S,C,b(p._payload),w)}if(fu(p)||Hc(p))return x=x.get(C)||null,d(S,x,p,w,null);Pf(S,p)}return null}function y(x,S,C,p){for(var w=null,b=null,k=S,E=S=0,I=null;k!==null&&E<C.length;E++){k.index>E?(I=k,k=null):I=k.sibling;var j=m(x,k,C[E],p);if(j===null){k===null&&(k=I);break}e&&k&&j.alternate===null&&t(x,k),S=o(j,S,E),b===null?w=j:b.sibling=j,b=j,k=I}if(E===C.length)return n(x,k),Pt&&Ja(x,E),w;if(k===null){for(;E<C.length;E++)k=f(x,C[E],p),k!==null&&(S=o(k,S,E),b===null?w=k:b.sibling=k,b=k);return Pt&&Ja(x,E),w}for(k=r(x,k);E<C.length;E++)I=g(k,x,E,C[E],p),I!==null&&(e&&I.alternate!==null&&k.delete(I.key===null?E:I.key),S=o(I,S,E),b===null?w=I:b.sibling=I,b=I);return e&&k.forEach(function(P){return t(x,P)}),Pt&&Ja(x,E),w}function v(x,S,C,p){var w=Hc(C);if(typeof w!="function")throw Error(ce(150));if(C=w.call(C),C==null)throw Error(ce(151));for(var b=w=null,k=S,E=S=0,I=null,j=C.next();k!==null&&!j.done;E++,j=C.next()){k.index>E?(I=k,k=null):I=k.sibling;var P=m(x,k,j.value,p);if(P===null){k===null&&(k=I);break}e&&k&&P.alternate===null&&t(x,k),S=o(P,S,E),b===null?w=P:b.sibling=P,b=P,k=I}if(j.done)return n(x,k),Pt&&Ja(x,E),w;if(k===null){for(;!j.done;E++,j=C.next())j=f(x,j.value,p),j!==null&&(S=o(j,S,E),b===null?w=j:b.sibling=j,b=j);return Pt&&Ja(x,E),w}for(k=r(x,k);!j.done;E++,j=C.next())j=g(k,x,E,j.value,p),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?E:j.key),S=o(j,S,E),b===null?w=j:b.sibling=j,b=j);return e&&k.forEach(function(B){return t(x,B)}),Pt&&Ja(x,E),w}function _(x,S,C,p){if(typeof C=="object"&&C!==null&&C.type===yl&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case yf:e:{for(var w=C.key,b=S;b!==null;){if(b.key===w){if(w=C.type,w===yl){if(b.tag===7){n(x,b.sibling),S=i(b,C.props.children),S.return=x,x=S;break e}}else if(b.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===na&&M6(w)===b.type){n(x,b.sibling),S=i(b,C.props),S.ref=Gc(x,b,C),S.return=x,x=S;break e}n(x,b);break}else t(x,b);b=b.sibling}C.type===yl?(S=ps(C.props.children,x.mode,p,C.key),S.return=x,x=S):(p=$p(C.type,C.key,C.props,null,x.mode,p),p.ref=Gc(x,S,C),p.return=x,x=p)}return a(x);case vl:e:{for(b=C.key;S!==null;){if(S.key===b)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){n(x,S.sibling),S=i(S,C.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=hv(C,x.mode,p),S.return=x,x=S}return a(x);case na:return b=C._init,_(x,S,b(C._payload),p)}if(fu(C))return y(x,S,C,p);if(Hc(C))return v(x,S,C,p);Pf(x,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,S!==null&&S.tag===6?(n(x,S.sibling),S=i(S,C),S.return=x,x=S):(n(x,S),S=pv(C,x.mode,p),S.return=x,x=S),a(x)):n(x,S)}return _}var Ql=dj(!0),fj=dj(!1),Hd={},ro=La(Hd),td=La(Hd),nd=La(Hd);function ss(e){if(e===Hd)throw Error(ce(174));return e}function qw(e,t){switch(yt(nd,t),yt(td,e),yt(ro,Hd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oy(t,e)}jt(ro),yt(ro,t)}function Jl(){jt(ro),jt(td),jt(nd)}function pj(e){ss(nd.current);var t=ss(ro.current),n=Oy(t,e.type);t!==n&&(yt(td,e),yt(ro,n))}function Gw(e){td.current===e&&(jt(ro),jt(td))}var Dt=La(0);function Eh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sv=[];function Kw(){for(var e=0;e<sv.length;e++)sv[e]._workInProgressVersionPrimary=null;sv.length=0}var Tp=Mo.ReactCurrentDispatcher,lv=Mo.ReactCurrentBatchConfig,ws=0,Mt=null,rn=null,pn=null,Rh=!1,ku=!1,rd=0,n$=0;function Nn(){throw Error(ce(321))}function Yw(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hi(e[n],t[n]))return!1;return!0}function Xw(e,t,n,r,i,o){if(ws=o,Mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tp.current=e===null||e.memoizedState===null?a$:s$,e=n(r,i),ku){o=0;do{if(ku=!1,rd=0,25<=o)throw Error(ce(301));o+=1,pn=rn=null,t.updateQueue=null,Tp.current=l$,e=n(r,i)}while(ku)}if(Tp.current=Ph,t=rn!==null&&rn.next!==null,ws=0,pn=rn=Mt=null,Rh=!1,t)throw Error(ce(300));return e}function Qw(){var e=rd!==0;return rd=0,e}function Xi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?Mt.memoizedState=pn=e:pn=pn.next=e,pn}function mi(){if(rn===null){var e=Mt.alternate;e=e!==null?e.memoizedState:null}else e=rn.next;var t=pn===null?Mt.memoizedState:pn.next;if(t!==null)pn=t,rn=e;else{if(e===null)throw Error(ce(310));rn=e,e={memoizedState:rn.memoizedState,baseState:rn.baseState,baseQueue:rn.baseQueue,queue:rn.queue,next:null},pn===null?Mt.memoizedState=pn=e:pn=pn.next=e}return pn}function id(e,t){return typeof t=="function"?t(e):t}function cv(e){var t=mi(),n=t.queue;if(n===null)throw Error(ce(311));n.lastRenderedReducer=e;var r=rn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,u=null,l=o;do{var d=l.lane;if((ws&d)===d)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var f={lane:d,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=f,a=r):u=u.next=f,Mt.lanes|=d,xs|=d}l=l.next}while(l!==null&&l!==o);u===null?a=r:u.next=s,Hi(r,t.memoizedState)||(gr=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Mt.lanes|=o,xs|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function uv(e){var t=mi(),n=t.queue;if(n===null)throw Error(ce(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Hi(o,t.memoizedState)||(gr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hj(){}function mj(e,t){var n=Mt,r=mi(),i=t(),o=!Hi(r.memoizedState,i);if(o&&(r.memoizedState=i,gr=!0),r=r.queue,Jw(yj.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||pn!==null&&pn.memoizedState.tag&1){if(n.flags|=2048,od(9,vj.bind(null,n,r,i,t),void 0,null),yn===null)throw Error(ce(349));ws&30||gj(n,t,i)}return i}function gj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vj(e,t,n,r){t.value=n,t.getSnapshot=r,bj(t)&&wj(e)}function yj(e,t,n){return n(function(){bj(t)&&wj(e)})}function bj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hi(e,n)}catch{return!0}}function wj(e){var t=Ao(e,1);t!==null&&Li(t,e,1,-1)}function $6(e){var t=Xi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:id,lastRenderedState:e},t.queue=e,e=e.dispatch=o$.bind(null,Mt,e),[t.memoizedState,e]}function od(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function xj(){return mi().memoizedState}function Op(e,t,n,r){var i=Xi();Mt.flags|=e,i.memoizedState=od(1|t,n,void 0,r===void 0?null:r)}function Mm(e,t,n,r){var i=mi();r=r===void 0?null:r;var o=void 0;if(rn!==null){var a=rn.memoizedState;if(o=a.destroy,r!==null&&Yw(r,a.deps)){i.memoizedState=od(t,n,o,r);return}}Mt.flags|=e,i.memoizedState=od(1|t,n,o,r)}function L6(e,t){return Op(8390656,8,e,t)}function Jw(e,t){return Mm(2048,8,e,t)}function Sj(e,t){return Mm(4,2,e,t)}function Cj(e,t){return Mm(4,4,e,t)}function _j(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function kj(e,t,n){return n=n!=null?n.concat([e]):null,Mm(4,4,_j.bind(null,t,e),n)}function Zw(){}function jj(e,t){var n=mi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yw(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ej(e,t){var n=mi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yw(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rj(e,t,n){return ws&21?(Hi(n,t)||(n=I7(),Mt.lanes|=n,xs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gr=!0),e.memoizedState=n)}function r$(e,t){var n=st;st=n!==0&&4>n?n:4,e(!0);var r=lv.transition;lv.transition={};try{e(!1),t()}finally{st=n,lv.transition=r}}function Pj(){return mi().memoizedState}function i$(e,t,n){var r=ba(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Aj(e))Ij(t,n);else if(n=sj(e,t,n,r),n!==null){var i=er();Li(n,e,r,i),Tj(n,t,r)}}function o$(e,t,n){var r=ba(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Aj(e))Ij(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Hi(s,a)){var u=t.interleaved;u===null?(i.next=i,Ww(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=sj(e,t,i,r),n!==null&&(i=er(),Li(n,e,r,i),Tj(n,t,r))}}function Aj(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function Ij(e,t){ku=Rh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Aw(e,n)}}var Ph={readContext:hi,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useInsertionEffect:Nn,useLayoutEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useMutableSource:Nn,useSyncExternalStore:Nn,useId:Nn,unstable_isNewReconciler:!1},a$={readContext:hi,useCallback:function(e,t){return Xi().memoizedState=[e,t===void 0?null:t],e},useContext:hi,useEffect:L6,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Op(4194308,4,_j.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Op(4194308,4,e,t)},useInsertionEffect:function(e,t){return Op(4,2,e,t)},useMemo:function(e,t){var n=Xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=i$.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=Xi();return e={current:e},t.memoizedState=e},useState:$6,useDebugValue:Zw,useDeferredValue:function(e){return Xi().memoizedState=e},useTransition:function(){var e=$6(!1),t=e[0];return e=r$.bind(null,e[1]),Xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,i=Xi();if(Pt){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),yn===null)throw Error(ce(349));ws&30||gj(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,L6(yj.bind(null,r,o,e),[e]),r.flags|=2048,od(9,vj.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Xi(),t=yn.identifierPrefix;if(Pt){var n=_o,r=Co;n=(r&~(1<<32-$i(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rd++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=n$++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},s$={readContext:hi,useCallback:jj,useContext:hi,useEffect:Jw,useImperativeHandle:kj,useInsertionEffect:Sj,useLayoutEffect:Cj,useMemo:Ej,useReducer:cv,useRef:xj,useState:function(){return cv(id)},useDebugValue:Zw,useDeferredValue:function(e){var t=mi();return Rj(t,rn.memoizedState,e)},useTransition:function(){var e=cv(id)[0],t=mi().memoizedState;return[e,t]},useMutableSource:hj,useSyncExternalStore:mj,useId:Pj,unstable_isNewReconciler:!1},l$={readContext:hi,useCallback:jj,useContext:hi,useEffect:Jw,useImperativeHandle:kj,useInsertionEffect:Sj,useLayoutEffect:Cj,useMemo:Ej,useReducer:uv,useRef:xj,useState:function(){return uv(id)},useDebugValue:Zw,useDeferredValue:function(e){var t=mi();return rn===null?t.memoizedState=e:Rj(t,rn.memoizedState,e)},useTransition:function(){var e=uv(id)[0],t=mi().memoizedState;return[e,t]},useMutableSource:hj,useSyncExternalStore:mj,useId:Pj,unstable_isNewReconciler:!1};function Zl(e,t){try{var n="",r=t;do n+=MN(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function dv(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function nb(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var c$=typeof WeakMap=="function"?WeakMap:Map;function Oj(e,t,n){n=ko(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ih||(Ih=!0,fb=r),nb(e,t)},n}function Dj(e,t,n){n=ko(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){nb(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){nb(e,t),typeof r!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function F6(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new c$;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=C$.bind(null,e,t,n),t.then(e,e))}function z6(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function B6(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ko(-1,1),t.tag=2,va(n,t,1))),n.lanes|=1),e)}var u$=Mo.ReactCurrentOwner,gr=!1;function Qn(e,t,n,r){t.child=e===null?fj(t,null,n,r):Ql(t,e.child,n,r)}function H6(e,t,n,r,i){n=n.render;var o=t.ref;return Ml(t,i),r=Xw(e,t,n,r,o,i),n=Qw(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Io(e,t,i)):(Pt&&n&&Lw(t),t.flags|=1,Qn(e,t,r,i),t.child)}function U6(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!sx(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Nj(e,t,o,r,i)):(e=$p(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Qu,n(a,r)&&e.ref===t.ref)return Io(e,t,i)}return t.flags|=1,e=wa(o,r),e.ref=t.ref,e.return=t,t.child=e}function Nj(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Qu(o,r)&&e.ref===t.ref)if(gr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(gr=!0);else return t.lanes=e.lanes,Io(e,t,i)}return rb(e,t,n,r,i)}function Mj(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Rl,Dr),Dr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yt(Rl,Dr),Dr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,yt(Rl,Dr),Dr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,yt(Rl,Dr),Dr|=r;return Qn(e,t,i,n),t.child}function $j(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rb(e,t,n,r,i){var o=br(n)?ys:Un.current;return o=Yl(t,o),Ml(t,i),n=Xw(e,t,n,r,o,i),r=Qw(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Io(e,t,i)):(Pt&&r&&Lw(t),t.flags|=1,Qn(e,t,n,i),t.child)}function W6(e,t,n,r,i){if(br(n)){var o=!0;xh(t)}else o=!1;if(Ml(t,i),t.stateNode===null)Dp(e,t),uj(t,n,r),tb(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=hi(l):(l=br(n)?ys:Un.current,l=Yl(t,l));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&N6(t,a,r,l),ra=!1;var m=t.memoizedState;a.state=m,jh(t,r,a,i),u=t.memoizedState,s!==r||m!==u||yr.current||ra?(typeof d=="function"&&(eb(t,n,d,r),u=t.memoizedState),(s=ra||D6(t,n,s,r,m,u,l))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lj(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ai(t.type,s),a.props=l,f=t.pendingProps,m=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=hi(u):(u=br(n)?ys:Un.current,u=Yl(t,u));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||m!==u)&&N6(t,a,r,u),ra=!1,m=t.memoizedState,a.state=m,jh(t,r,a,i);var y=t.memoizedState;s!==f||m!==y||yr.current||ra?(typeof g=="function"&&(eb(t,n,g,r),y=t.memoizedState),(l=ra||D6(t,n,l,r,m,y,u)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return ib(e,t,n,r,o,i)}function ib(e,t,n,r,i,o){$j(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&P6(t,n,!1),Io(e,t,o);r=t.stateNode,u$.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ql(t,e.child,null,o),t.child=Ql(t,null,s,o)):Qn(e,t,s,o),t.memoizedState=r.state,i&&P6(t,n,!0),t.child}function Lj(e){var t=e.stateNode;t.pendingContext?R6(e,t.pendingContext,t.pendingContext!==t.context):t.context&&R6(e,t.context,!1),qw(e,t.containerInfo)}function V6(e,t,n,r,i){return Xl(),zw(i),t.flags|=256,Qn(e,t,n,r),t.child}var ob={dehydrated:null,treeContext:null,retryLane:0};function ab(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fj(e,t,n){var r=t.pendingProps,i=Dt.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),yt(Dt,i&1),e===null)return Jy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Fm(a,r,0,null),e=ps(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ab(n),t.memoizedState=ob,e):ex(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return d$(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=wa(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=wa(s,o):(o=ps(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?ab(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=ob,r}return o=e.child,e=o.sibling,r=wa(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ex(e,t){return t=Fm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Af(e,t,n,r){return r!==null&&zw(r),Ql(t,e.child,null,n),e=ex(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d$(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=dv(Error(ce(422))),Af(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Fm({mode:"visible",children:r.children},i,0,null),o=ps(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ql(t,e.child,null,a),t.child.memoizedState=ab(a),t.memoizedState=ob,o);if(!(t.mode&1))return Af(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(ce(419)),r=dv(o,r,void 0),Af(e,t,a,r)}if(s=(a&e.childLanes)!==0,gr||s){if(r=yn,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ao(e,i),Li(r,e,i,-1))}return ax(),r=dv(Error(ce(421))),Af(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=_$.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Fr=ga(i.nextSibling),Br=t,Pt=!0,Oi=null,e!==null&&(ai[si++]=Co,ai[si++]=_o,ai[si++]=bs,Co=e.id,_o=e.overflow,bs=t),t=ex(t,r.children),t.flags|=4096,t)}function q6(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zy(e.return,t,n)}function fv(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zj(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Qn(e,t,r.children,n),r=Dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&q6(e,n,t);else if(e.tag===19)q6(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(yt(Dt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eh(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),fv(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eh(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}fv(t,!0,n,null,o);break;case"together":fv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Dp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Io(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=wa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function f$(e,t,n){switch(t.tag){case 3:Lj(t),Xl();break;case 5:pj(t);break;case 1:br(t.type)&&xh(t);break;case 4:qw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;yt(_h,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(yt(Dt,Dt.current&1),t.flags|=128,null):n&t.child.childLanes?Fj(e,t,n):(yt(Dt,Dt.current&1),e=Io(e,t,n),e!==null?e.sibling:null);yt(Dt,Dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return zj(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),yt(Dt,Dt.current),r)break;return null;case 22:case 23:return t.lanes=0,Mj(e,t,n)}return Io(e,t,n)}var Bj,sb,Hj,Uj;Bj=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};sb=function(){};Hj=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ss(ro.current);var o=null;switch(n){case"input":i=Py(e,i),r=Py(e,r),o=[];break;case"select":i=Lt({},i,{value:void 0}),r=Lt({},r,{value:void 0}),o=[];break;case"textarea":i=Ty(e,i),r=Ty(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bh)}Dy(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Wu.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Wu.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&Ct("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};Uj=function(e,t,n,r){n!==r&&(t.flags|=4)};function Kc(e,t){if(!Pt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function p$(e,t,n){var r=t.pendingProps;switch(Fw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(t),null;case 1:return br(t.type)&&wh(),Mn(t),null;case 3:return r=t.stateNode,Jl(),jt(yr),jt(Un),Kw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Oi!==null&&(mb(Oi),Oi=null))),sb(e,t),Mn(t),null;case 5:Gw(t);var i=ss(nd.current);if(n=t.type,e!==null&&t.stateNode!=null)Hj(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ce(166));return Mn(t),null}if(e=ss(ro.current),Rf(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Zi]=t,r[ed]=o,e=(t.mode&1)!==0,n){case"dialog":Ct("cancel",r),Ct("close",r);break;case"iframe":case"object":case"embed":Ct("load",r);break;case"video":case"audio":for(i=0;i<hu.length;i++)Ct(hu[i],r);break;case"source":Ct("error",r);break;case"img":case"image":case"link":Ct("error",r),Ct("load",r);break;case"details":Ct("toggle",r);break;case"input":t6(r,o),Ct("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ct("invalid",r);break;case"textarea":r6(r,o),Ct("invalid",r)}Dy(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Ef(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Ef(r.textContent,s,e),i=["children",""+s]):Wu.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ct("scroll",r)}switch(n){case"input":bf(r),n6(r,o,!0);break;case"textarea":bf(r),i6(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=bh)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=g7(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Zi]=t,e[ed]=r,Bj(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ny(n,r),n){case"dialog":Ct("cancel",e),Ct("close",e),i=r;break;case"iframe":case"object":case"embed":Ct("load",e),i=r;break;case"video":case"audio":for(i=0;i<hu.length;i++)Ct(hu[i],e);i=r;break;case"source":Ct("error",e),i=r;break;case"img":case"image":case"link":Ct("error",e),Ct("load",e),i=r;break;case"details":Ct("toggle",e),i=r;break;case"input":t6(e,r),i=Py(e,r),Ct("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Lt({},r,{value:void 0}),Ct("invalid",e);break;case"textarea":r6(e,r),i=Ty(e,r),Ct("invalid",e);break;default:i=r}Dy(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?b7(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&v7(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Vu(e,u):typeof u=="number"&&Vu(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Wu.hasOwnProperty(o)?u!=null&&o==="onScroll"&&Ct("scroll",e):u!=null&&_w(e,o,u,a))}switch(n){case"input":bf(e),n6(e,r,!1);break;case"textarea":bf(e),i6(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ka(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Tl(e,!!r.multiple,o,!1):r.defaultValue!=null&&Tl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=bh)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Mn(t),null;case 6:if(e&&t.stateNode!=null)Uj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ce(166));if(n=ss(nd.current),ss(ro.current),Rf(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zi]=t,(o=r.nodeValue!==n)&&(e=Br,e!==null))switch(e.tag){case 3:Ef(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ef(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zi]=t,t.stateNode=r}return Mn(t),null;case 13:if(jt(Dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pt&&Fr!==null&&t.mode&1&&!(t.flags&128))aj(),Xl(),t.flags|=98560,o=!1;else if(o=Rf(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ce(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ce(317));o[Zi]=t}else Xl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mn(t),o=!1}else Oi!==null&&(mb(Oi),Oi=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?an===0&&(an=3):ax())),t.updateQueue!==null&&(t.flags|=4),Mn(t),null);case 4:return Jl(),sb(e,t),e===null&&Ju(t.stateNode.containerInfo),Mn(t),null;case 10:return Uw(t.type._context),Mn(t),null;case 17:return br(t.type)&&wh(),Mn(t),null;case 19:if(jt(Dt),o=t.memoizedState,o===null)return Mn(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Kc(o,!1);else{if(an!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Eh(e),a!==null){for(t.flags|=128,Kc(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return yt(Dt,Dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Yt()>ec&&(t.flags|=128,r=!0,Kc(o,!1),t.lanes=4194304)}else{if(!r)if(e=Eh(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kc(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Pt)return Mn(t),null}else 2*Yt()-o.renderingStartTime>ec&&n!==1073741824&&(t.flags|=128,r=!0,Kc(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Yt(),t.sibling=null,n=Dt.current,yt(Dt,r?n&1|2:n&1),t):(Mn(t),null);case 22:case 23:return ox(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dr&1073741824&&(Mn(t),t.subtreeFlags&6&&(t.flags|=8192)):Mn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function h$(e,t){switch(Fw(t),t.tag){case 1:return br(t.type)&&wh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(),jt(yr),jt(Un),Kw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gw(t),null;case 13:if(jt(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(Dt),null;case 4:return Jl(),null;case 10:return Uw(t.type._context),null;case 22:case 23:return ox(),null;case 24:return null;default:return null}}var If=!1,$n=!1,m$=typeof WeakSet=="function"?WeakSet:Set,xe=null;function El(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ut(e,t,r)}else n.current=null}function lb(e,t,n){try{n()}catch(r){Ut(e,t,r)}}var G6=!1;function g$(e,t){if(Vy=gh,e=G7(),$w(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,d=0,f=e,m=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(g=f.firstChild)!==null;)m=f,f=g;for(;;){if(f===e)break t;if(m===n&&++l===i&&(s=a),m===o&&++d===r&&(u=a),(g=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=g}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(qy={focusedElem:e,selectionRange:n},gh=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,_=y.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ai(t.type,v),_);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(p){Ut(t,t.return,p)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=G6,G6=!1,y}function ju(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&lb(t,n,o)}i=i.next}while(i!==r)}}function $m(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Wj(e){var t=e.alternate;t!==null&&(e.alternate=null,Wj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zi],delete t[ed],delete t[Yy],delete t[JM],delete t[ZM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vj(e){return e.tag===5||e.tag===3||e.tag===4}function K6(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ub(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bh));else if(r!==4&&(e=e.child,e!==null))for(ub(e,t,n),e=e.sibling;e!==null;)ub(e,t,n),e=e.sibling}function db(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(db(e,t,n),e=e.sibling;e!==null;)db(e,t,n),e=e.sibling}var Rn=null,Ti=!1;function Vo(e,t,n){for(n=n.child;n!==null;)qj(e,t,n),n=n.sibling}function qj(e,t,n){if(no&&typeof no.onCommitFiberUnmount=="function")try{no.onCommitFiberUnmount(Pm,n)}catch{}switch(n.tag){case 5:$n||El(n,t);case 6:var r=Rn,i=Ti;Rn=null,Vo(e,t,n),Rn=r,Ti=i,Rn!==null&&(Ti?(e=Rn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rn.removeChild(n.stateNode));break;case 18:Rn!==null&&(Ti?(e=Rn,n=n.stateNode,e.nodeType===8?ov(e.parentNode,n):e.nodeType===1&&ov(e,n),Yu(e)):ov(Rn,n.stateNode));break;case 4:r=Rn,i=Ti,Rn=n.stateNode.containerInfo,Ti=!0,Vo(e,t,n),Rn=r,Ti=i;break;case 0:case 11:case 14:case 15:if(!$n&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&lb(n,t,a),i=i.next}while(i!==r)}Vo(e,t,n);break;case 1:if(!$n&&(El(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ut(n,t,s)}Vo(e,t,n);break;case 21:Vo(e,t,n);break;case 22:n.mode&1?($n=(r=$n)||n.memoizedState!==null,Vo(e,t,n),$n=r):Vo(e,t,n);break;default:Vo(e,t,n)}}function Y6(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new m$),t.forEach(function(r){var i=k$.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ri(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Rn=s.stateNode,Ti=!1;break e;case 3:Rn=s.stateNode.containerInfo,Ti=!0;break e;case 4:Rn=s.stateNode.containerInfo,Ti=!0;break e}s=s.return}if(Rn===null)throw Error(ce(160));qj(o,a,i),Rn=null,Ti=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){Ut(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gj(t,e),t=t.sibling}function Gj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ri(t,e),qi(e),r&4){try{ju(3,e,e.return),$m(3,e)}catch(v){Ut(e,e.return,v)}try{ju(5,e,e.return)}catch(v){Ut(e,e.return,v)}}break;case 1:Ri(t,e),qi(e),r&512&&n!==null&&El(n,n.return);break;case 5:if(Ri(t,e),qi(e),r&512&&n!==null&&El(n,n.return),e.flags&32){var i=e.stateNode;try{Vu(i,"")}catch(v){Ut(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&h7(i,o),Ny(s,a);var l=Ny(s,o);for(a=0;a<u.length;a+=2){var d=u[a],f=u[a+1];d==="style"?b7(i,f):d==="dangerouslySetInnerHTML"?v7(i,f):d==="children"?Vu(i,f):_w(i,d,f,l)}switch(s){case"input":Ay(i,o);break;case"textarea":m7(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?Tl(i,!!o.multiple,g,!1):m!==!!o.multiple&&(o.defaultValue!=null?Tl(i,!!o.multiple,o.defaultValue,!0):Tl(i,!!o.multiple,o.multiple?[]:"",!1))}i[ed]=o}catch(v){Ut(e,e.return,v)}}break;case 6:if(Ri(t,e),qi(e),r&4){if(e.stateNode===null)throw Error(ce(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){Ut(e,e.return,v)}}break;case 3:if(Ri(t,e),qi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Yu(t.containerInfo)}catch(v){Ut(e,e.return,v)}break;case 4:Ri(t,e),qi(e);break;case 13:Ri(t,e),qi(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(rx=Yt())),r&4&&Y6(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?($n=(l=$n)||d,Ri(t,e),$n=l):Ri(t,e),qi(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!d&&e.mode&1)for(xe=e,d=e.child;d!==null;){for(f=xe=d;xe!==null;){switch(m=xe,g=m.child,m.tag){case 0:case 11:case 14:case 15:ju(4,m,m.return);break;case 1:El(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){Ut(r,n,v)}}break;case 5:El(m,m.return);break;case 22:if(m.memoizedState!==null){Q6(f);continue}}g!==null?(g.return=m,xe=g):Q6(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=f.stateNode,u=f.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=y7("display",a))}catch(v){Ut(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=l?"":f.memoizedProps}catch(v){Ut(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ri(t,e),qi(e),r&4&&Y6(e);break;case 21:break;default:Ri(t,e),qi(e)}}function qi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vj(n)){var r=n;break e}n=n.return}throw Error(ce(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Vu(i,""),r.flags&=-33);var o=K6(e);db(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=K6(e);ub(e,s,a);break;default:throw Error(ce(161))}}catch(u){Ut(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v$(e,t,n){xe=e,Kj(e)}function Kj(e,t,n){for(var r=(e.mode&1)!==0;xe!==null;){var i=xe,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||If;if(!a){var s=i.alternate,u=s!==null&&s.memoizedState!==null||$n;s=If;var l=$n;if(If=a,($n=u)&&!l)for(xe=i;xe!==null;)a=xe,u=a.child,a.tag===22&&a.memoizedState!==null?J6(i):u!==null?(u.return=a,xe=u):J6(i);for(;o!==null;)xe=o,Kj(o),o=o.sibling;xe=i,If=s,$n=l}X6(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,xe=o):X6(e)}}function X6(e){for(;xe!==null;){var t=xe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:$n||$m(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$n)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ai(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&O6(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}O6(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var d=l.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Yu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ce(163))}$n||t.flags&512&&cb(t)}catch(m){Ut(t,t.return,m)}}if(t===e){xe=null;break}if(n=t.sibling,n!==null){n.return=t.return,xe=n;break}xe=t.return}}function Q6(e){for(;xe!==null;){var t=xe;if(t===e){xe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,xe=n;break}xe=t.return}}function J6(e){for(;xe!==null;){var t=xe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$m(4,t)}catch(u){Ut(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){Ut(t,i,u)}}var o=t.return;try{cb(t)}catch(u){Ut(t,o,u)}break;case 5:var a=t.return;try{cb(t)}catch(u){Ut(t,a,u)}}}catch(u){Ut(t,t.return,u)}if(t===e){xe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,xe=s;break}xe=t.return}}var y$=Math.ceil,Ah=Mo.ReactCurrentDispatcher,tx=Mo.ReactCurrentOwner,di=Mo.ReactCurrentBatchConfig,tt=0,yn=null,en=null,In=0,Dr=0,Rl=La(0),an=0,ad=null,xs=0,Lm=0,nx=0,Eu=null,mr=null,rx=0,ec=1/0,wo=null,Ih=!1,fb=null,ya=null,Tf=!1,ca=null,Th=0,Ru=0,pb=null,Np=-1,Mp=0;function er(){return tt&6?Yt():Np!==-1?Np:Np=Yt()}function ba(e){return e.mode&1?tt&2&&In!==0?In&-In:t$.transition!==null?(Mp===0&&(Mp=I7()),Mp):(e=st,e!==0||(e=window.event,e=e===void 0?16:L7(e.type)),e):1}function Li(e,t,n,r){if(50<Ru)throw Ru=0,pb=null,Error(ce(185));Fd(e,n,r),(!(tt&2)||e!==yn)&&(e===yn&&(!(tt&2)&&(Lm|=n),an===4&&aa(e,In)),wr(e,r),n===1&&tt===0&&!(t.mode&1)&&(ec=Yt()+500,Dm&&Fa()))}function wr(e,t){var n=e.callbackNode;tM(e,t);var r=mh(e,e===yn?In:0);if(r===0)n!==null&&s6(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&s6(n),t===1)e.tag===0?e$(Z6.bind(null,e)):rj(Z6.bind(null,e)),XM(function(){!(tt&6)&&Fa()}),n=null;else{switch(T7(r)){case 1:n=Pw;break;case 4:n=P7;break;case 16:n=hh;break;case 536870912:n=A7;break;default:n=hh}n=nE(n,Yj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yj(e,t){if(Np=-1,Mp=0,tt&6)throw Error(ce(327));var n=e.callbackNode;if($l()&&e.callbackNode!==n)return null;var r=mh(e,e===yn?In:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Oh(e,r);else{t=r;var i=tt;tt|=2;var o=Qj();(yn!==e||In!==t)&&(wo=null,ec=Yt()+500,fs(e,t));do try{x$();break}catch(s){Xj(e,s)}while(!0);Hw(),Ah.current=o,tt=i,en!==null?t=0:(yn=null,In=0,t=an)}if(t!==0){if(t===2&&(i=zy(e),i!==0&&(r=i,t=hb(e,i))),t===1)throw n=ad,fs(e,0),aa(e,r),wr(e,Yt()),n;if(t===6)aa(e,r);else{if(i=e.current.alternate,!(r&30)&&!b$(i)&&(t=Oh(e,r),t===2&&(o=zy(e),o!==0&&(r=o,t=hb(e,o))),t===1))throw n=ad,fs(e,0),aa(e,r),wr(e,Yt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(ce(345));case 2:Za(e,mr,wo);break;case 3:if(aa(e,r),(r&130023424)===r&&(t=rx+500-Yt(),10<t)){if(mh(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){er(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ky(Za.bind(null,e,mr,wo),t);break}Za(e,mr,wo);break;case 4:if(aa(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-$i(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*y$(r/1960))-r,10<r){e.timeoutHandle=Ky(Za.bind(null,e,mr,wo),r);break}Za(e,mr,wo);break;case 5:Za(e,mr,wo);break;default:throw Error(ce(329))}}}return wr(e,Yt()),e.callbackNode===n?Yj.bind(null,e):null}function hb(e,t){var n=Eu;return e.current.memoizedState.isDehydrated&&(fs(e,t).flags|=256),e=Oh(e,t),e!==2&&(t=mr,mr=n,t!==null&&mb(t)),e}function mb(e){mr===null?mr=e:mr.push.apply(mr,e)}function b$(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Hi(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function aa(e,t){for(t&=~nx,t&=~Lm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$i(t),r=1<<n;e[n]=-1,t&=~r}}function Z6(e){if(tt&6)throw Error(ce(327));$l();var t=mh(e,0);if(!(t&1))return wr(e,Yt()),null;var n=Oh(e,t);if(e.tag!==0&&n===2){var r=zy(e);r!==0&&(t=r,n=hb(e,r))}if(n===1)throw n=ad,fs(e,0),aa(e,t),wr(e,Yt()),n;if(n===6)throw Error(ce(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Za(e,mr,wo),wr(e,Yt()),null}function ix(e,t){var n=tt;tt|=1;try{return e(t)}finally{tt=n,tt===0&&(ec=Yt()+500,Dm&&Fa())}}function Ss(e){ca!==null&&ca.tag===0&&!(tt&6)&&$l();var t=tt;tt|=1;var n=di.transition,r=st;try{if(di.transition=null,st=1,e)return e()}finally{st=r,di.transition=n,tt=t,!(tt&6)&&Fa()}}function ox(){Dr=Rl.current,jt(Rl)}function fs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,YM(n)),en!==null)for(n=en.return;n!==null;){var r=n;switch(Fw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wh();break;case 3:Jl(),jt(yr),jt(Un),Kw();break;case 5:Gw(r);break;case 4:Jl();break;case 13:jt(Dt);break;case 19:jt(Dt);break;case 10:Uw(r.type._context);break;case 22:case 23:ox()}n=n.return}if(yn=e,en=e=wa(e.current,null),In=Dr=t,an=0,ad=null,nx=Lm=xs=0,mr=Eu=null,as!==null){for(t=0;t<as.length;t++)if(n=as[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}as=null}return e}function Xj(e,t){do{var n=en;try{if(Hw(),Tp.current=Ph,Rh){for(var r=Mt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Rh=!1}if(ws=0,pn=rn=Mt=null,ku=!1,rd=0,tx.current=null,n===null||n.return===null){an=1,ad=t,en=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=In,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,d=s,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=z6(a);if(g!==null){g.flags&=-257,B6(g,a,s,o,t),g.mode&1&&F6(o,l,t),t=g,u=l;var y=t.updateQueue;if(y===null){var v=new Set;v.add(u),t.updateQueue=v}else y.add(u);break e}else{if(!(t&1)){F6(o,l,t),ax();break e}u=Error(ce(426))}}else if(Pt&&s.mode&1){var _=z6(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),B6(_,a,s,o,t),zw(Zl(u,s));break e}}o=u=Zl(u,s),an!==4&&(an=2),Eu===null?Eu=[o]:Eu.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=Oj(o,u,t);T6(o,x);break e;case 1:s=u;var S=o.type,C=o.stateNode;if(!(o.flags&128)&&(typeof S.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ya===null||!ya.has(C)))){o.flags|=65536,t&=-t,o.lanes|=t;var p=Dj(o,s,t);T6(o,p);break e}}o=o.return}while(o!==null)}Zj(n)}catch(w){t=w,en===n&&n!==null&&(en=n=n.return);continue}break}while(!0)}function Qj(){var e=Ah.current;return Ah.current=Ph,e===null?Ph:e}function ax(){(an===0||an===3||an===2)&&(an=4),yn===null||!(xs&268435455)&&!(Lm&268435455)||aa(yn,In)}function Oh(e,t){var n=tt;tt|=2;var r=Qj();(yn!==e||In!==t)&&(wo=null,fs(e,t));do try{w$();break}catch(i){Xj(e,i)}while(!0);if(Hw(),tt=n,Ah.current=r,en!==null)throw Error(ce(261));return yn=null,In=0,an}function w$(){for(;en!==null;)Jj(en)}function x$(){for(;en!==null&&!qN();)Jj(en)}function Jj(e){var t=tE(e.alternate,e,Dr);e.memoizedProps=e.pendingProps,t===null?Zj(e):en=t,tx.current=null}function Zj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=h$(n,t),n!==null){n.flags&=32767,en=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{an=6,en=null;return}}else if(n=p$(n,t,Dr),n!==null){en=n;return}if(t=t.sibling,t!==null){en=t;return}en=t=e}while(t!==null);an===0&&(an=5)}function Za(e,t,n){var r=st,i=di.transition;try{di.transition=null,st=1,S$(e,t,n,r)}finally{di.transition=i,st=r}return null}function S$(e,t,n,r){do $l();while(ca!==null);if(tt&6)throw Error(ce(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ce(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(nM(e,o),e===yn&&(en=yn=null,In=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Tf||(Tf=!0,nE(hh,function(){return $l(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=di.transition,di.transition=null;var a=st;st=1;var s=tt;tt|=4,tx.current=null,g$(e,n),Gj(n,e),HM(qy),gh=!!Vy,qy=Vy=null,e.current=n,v$(n),GN(),tt=s,st=a,di.transition=o}else e.current=n;if(Tf&&(Tf=!1,ca=e,Th=i),o=e.pendingLanes,o===0&&(ya=null),XN(n.stateNode),wr(e,Yt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ih)throw Ih=!1,e=fb,fb=null,e;return Th&1&&e.tag!==0&&$l(),o=e.pendingLanes,o&1?e===pb?Ru++:(Ru=0,pb=e):Ru=0,Fa(),null}function $l(){if(ca!==null){var e=T7(Th),t=di.transition,n=st;try{if(di.transition=null,st=16>e?16:e,ca===null)var r=!1;else{if(e=ca,ca=null,Th=0,tt&6)throw Error(ce(331));var i=tt;for(tt|=4,xe=e.current;xe!==null;){var o=xe,a=o.child;if(xe.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(xe=l;xe!==null;){var d=xe;switch(d.tag){case 0:case 11:case 15:ju(8,d,o)}var f=d.child;if(f!==null)f.return=d,xe=f;else for(;xe!==null;){d=xe;var m=d.sibling,g=d.return;if(Wj(d),d===l){xe=null;break}if(m!==null){m.return=g,xe=m;break}xe=g}}}var y=o.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}xe=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,xe=a;else e:for(;xe!==null;){if(o=xe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ju(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,xe=x;break e}xe=o.return}}var S=e.current;for(xe=S;xe!==null;){a=xe;var C=a.child;if(a.subtreeFlags&2064&&C!==null)C.return=a,xe=C;else e:for(a=S;xe!==null;){if(s=xe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:$m(9,s)}}catch(w){Ut(s,s.return,w)}if(s===a){xe=null;break e}var p=s.sibling;if(p!==null){p.return=s.return,xe=p;break e}xe=s.return}}if(tt=i,Fa(),no&&typeof no.onPostCommitFiberRoot=="function")try{no.onPostCommitFiberRoot(Pm,e)}catch{}r=!0}return r}finally{st=n,di.transition=t}}return!1}function e8(e,t,n){t=Zl(n,t),t=Oj(e,t,1),e=va(e,t,1),t=er(),e!==null&&(Fd(e,1,t),wr(e,t))}function Ut(e,t,n){if(e.tag===3)e8(e,e,n);else for(;t!==null;){if(t.tag===3){e8(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ya===null||!ya.has(r))){e=Zl(n,e),e=Dj(t,e,1),t=va(t,e,1),e=er(),t!==null&&(Fd(t,1,e),wr(t,e));break}}t=t.return}}function C$(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=er(),e.pingedLanes|=e.suspendedLanes&n,yn===e&&(In&n)===n&&(an===4||an===3&&(In&130023424)===In&&500>Yt()-rx?fs(e,0):nx|=n),wr(e,t)}function eE(e,t){t===0&&(e.mode&1?(t=Sf,Sf<<=1,!(Sf&130023424)&&(Sf=4194304)):t=1);var n=er();e=Ao(e,t),e!==null&&(Fd(e,t,n),wr(e,n))}function _$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eE(e,n)}function k$(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),eE(e,n)}var tE;tE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yr.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,f$(e,t,n);gr=!!(e.flags&131072)}else gr=!1,Pt&&t.flags&1048576&&ij(t,Ch,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Dp(e,t),e=t.pendingProps;var i=Yl(t,Un.current);Ml(t,n),i=Xw(null,t,r,e,i,n);var o=Qw();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,br(r)?(o=!0,xh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Vw(t),i.updater=Nm,t.stateNode=i,i._reactInternals=t,tb(t,r,e,n),t=ib(null,t,r,!0,o,n)):(t.tag=0,Pt&&o&&Lw(t),Qn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Dp(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=E$(r),e=Ai(r,e),i){case 0:t=rb(null,t,r,e,n);break e;case 1:t=W6(null,t,r,e,n);break e;case 11:t=H6(null,t,r,e,n);break e;case 14:t=U6(null,t,r,Ai(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),rb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),W6(e,t,r,i,n);case 3:e:{if(Lj(t),e===null)throw Error(ce(387));r=t.pendingProps,o=t.memoizedState,i=o.element,lj(e,t),jh(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Zl(Error(ce(423)),t),t=V6(e,t,r,n,i);break e}else if(r!==i){i=Zl(Error(ce(424)),t),t=V6(e,t,r,n,i);break e}else for(Fr=ga(t.stateNode.containerInfo.firstChild),Br=t,Pt=!0,Oi=null,n=fj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xl(),r===i){t=Io(e,t,n);break e}Qn(e,t,r,n)}t=t.child}return t;case 5:return pj(t),e===null&&Jy(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Gy(r,i)?a=null:o!==null&&Gy(r,o)&&(t.flags|=32),$j(e,t),Qn(e,t,a,n),t.child;case 6:return e===null&&Jy(t),null;case 13:return Fj(e,t,n);case 4:return qw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ql(t,null,r,n):Qn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),H6(e,t,r,i,n);case 7:return Qn(e,t,t.pendingProps,n),t.child;case 8:return Qn(e,t,t.pendingProps.children,n),t.child;case 12:return Qn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,yt(_h,r._currentValue),r._currentValue=a,o!==null)if(Hi(o.value,a)){if(o.children===i.children&&!yr.current){t=Io(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ko(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var d=l.pending;d===null?u.next=u:(u.next=d.next,d.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Zy(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(ce(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Zy(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Qn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ml(t,n),i=hi(i),r=r(i),t.flags|=1,Qn(e,t,r,n),t.child;case 14:return r=t.type,i=Ai(r,t.pendingProps),i=Ai(r.type,i),U6(e,t,r,i,n);case 15:return Nj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ai(r,i),Dp(e,t),t.tag=1,br(r)?(e=!0,xh(t)):e=!1,Ml(t,n),uj(t,r,i),tb(t,r,i,n),ib(null,t,r,!0,e,n);case 19:return zj(e,t,n);case 22:return Mj(e,t,n)}throw Error(ce(156,t.tag))};function nE(e,t){return R7(e,t)}function j$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new j$(e,t,n,r)}function sx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function E$(e){if(typeof e=="function")return sx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jw)return 11;if(e===Ew)return 14}return 2}function wa(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $p(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")sx(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case yl:return ps(n.children,i,o,t);case kw:a=8,i|=8;break;case ky:return e=ui(12,n,t,i|2),e.elementType=ky,e.lanes=o,e;case jy:return e=ui(13,n,t,i),e.elementType=jy,e.lanes=o,e;case Ey:return e=ui(19,n,t,i),e.elementType=Ey,e.lanes=o,e;case d7:return Fm(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c7:a=10;break e;case u7:a=9;break e;case jw:a=11;break e;case Ew:a=14;break e;case na:a=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=ui(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ps(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function Fm(e,t,n,r){return e=ui(22,e,r,t),e.elementType=d7,e.lanes=n,e.stateNode={isHidden:!1},e}function pv(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function hv(e,t,n){return t=ui(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function R$(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=K0(0),this.expirationTimes=K0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=K0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lx(e,t,n,r,i,o,a,s,u){return e=new R$(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ui(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vw(o),e}function P$(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rE(e){if(!e)return ja;e=e._reactInternals;e:{if(Ns(e)!==e||e.tag!==1)throw Error(ce(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(br(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ce(171))}if(e.tag===1){var n=e.type;if(br(n))return nj(e,n,t)}return t}function iE(e,t,n,r,i,o,a,s,u){return e=lx(n,r,!0,e,i,o,a,s,u),e.context=rE(null),n=e.current,r=er(),i=ba(n),o=ko(r,i),o.callback=t??null,va(n,o,i),e.current.lanes=i,Fd(e,i,r),wr(e,r),e}function zm(e,t,n,r){var i=t.current,o=er(),a=ba(i);return n=rE(n),t.context===null?t.context=n:t.pendingContext=n,t=ko(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=va(i,t,a),e!==null&&(Li(e,i,a,o),Ip(e,i,a)),a}function Dh(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function t8(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cx(e,t){t8(e,t),(e=e.alternate)&&t8(e,t)}function A$(){return null}var oE=typeof reportError=="function"?reportError:function(e){console.error(e)};function ux(e){this._internalRoot=e}Bm.prototype.render=ux.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ce(409));zm(e,t,null,null)};Bm.prototype.unmount=ux.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ss(function(){zm(null,e,null,null)}),t[Po]=null}};function Bm(e){this._internalRoot=e}Bm.prototype.unstable_scheduleHydration=function(e){if(e){var t=N7();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oa.length&&t!==0&&t<oa[n].priority;n++);oa.splice(n,0,e),n===0&&$7(e)}};function dx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Hm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function n8(){}function I$(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=Dh(a);o.call(l)}}var a=iE(t,r,e,0,null,!1,!1,"",n8);return e._reactRootContainer=a,e[Po]=a.current,Ju(e.nodeType===8?e.parentNode:e),Ss(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Dh(u);s.call(l)}}var u=lx(e,0,!1,null,null,!1,!1,"",n8);return e._reactRootContainer=u,e[Po]=u.current,Ju(e.nodeType===8?e.parentNode:e),Ss(function(){zm(t,u,n,r)}),u}function Um(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var u=Dh(a);s.call(u)}}zm(t,a,e,i)}else a=I$(n,t,e,i,r);return Dh(a)}O7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pu(t.pendingLanes);n!==0&&(Aw(t,n|1),wr(t,Yt()),!(tt&6)&&(ec=Yt()+500,Fa()))}break;case 13:Ss(function(){var r=Ao(e,1);if(r!==null){var i=er();Li(r,e,1,i)}}),cx(e,1)}};Iw=function(e){if(e.tag===13){var t=Ao(e,134217728);if(t!==null){var n=er();Li(t,e,134217728,n)}cx(e,134217728)}};D7=function(e){if(e.tag===13){var t=ba(e),n=Ao(e,t);if(n!==null){var r=er();Li(n,e,t,r)}cx(e,t)}};N7=function(){return st};M7=function(e,t){var n=st;try{return st=e,t()}finally{st=n}};$y=function(e,t,n){switch(t){case"input":if(Ay(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Om(r);if(!i)throw Error(ce(90));p7(r),Ay(r,i)}}}break;case"textarea":m7(e,n);break;case"select":t=n.value,t!=null&&Tl(e,!!n.multiple,t,!1)}};S7=ix;C7=Ss;var T$={usingClientEntryPoint:!1,Events:[Bd,Sl,Om,w7,x7,ix]},Yc={findFiberByHostInstance:os,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},O$={bundleType:Yc.bundleType,version:Yc.version,rendererPackageName:Yc.rendererPackageName,rendererConfig:Yc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Mo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=j7(e),e===null?null:e.stateNode},findFiberByHostInstance:Yc.findFiberByHostInstance||A$,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Of=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Of.isDisabled&&Of.supportsFiber)try{Pm=Of.inject(O$),no=Of}catch{}}Kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T$;Kr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!dx(t))throw Error(ce(200));return P$(e,t,null,n)};Kr.createRoot=function(e,t){if(!dx(e))throw Error(ce(299));var n=!1,r="",i=oE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=lx(e,1,!1,null,null,n,!1,r,i),e[Po]=t.current,Ju(e.nodeType===8?e.parentNode:e),new ux(t)};Kr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ce(188)):(e=Object.keys(e).join(","),Error(ce(268,e)));return e=j7(t),e=e===null?null:e.stateNode,e};Kr.flushSync=function(e){return Ss(e)};Kr.hydrate=function(e,t,n){if(!Hm(t))throw Error(ce(200));return Um(null,e,t,!0,n)};Kr.hydrateRoot=function(e,t,n){if(!dx(e))throw Error(ce(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=oE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=iE(t,null,e,1,n??null,i,!1,o,a),e[Po]=t.current,Ju(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Bm(t)};Kr.render=function(e,t,n){if(!Hm(t))throw Error(ce(200));return Um(null,e,t,!1,n)};Kr.unmountComponentAtNode=function(e){if(!Hm(e))throw Error(ce(40));return e._reactRootContainer?(Ss(function(){Um(null,null,e,!1,function(){e._reactRootContainer=null,e[Po]=null})}),!0):!1};Kr.unstable_batchedUpdates=ix;Kr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Hm(n))throw Error(ce(200));if(e==null||e._reactInternals===void 0)throw Error(ce(38));return Um(e,t,n,!1,r)};Kr.version="18.2.0-next-9e3b772b8-20220608";function aE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aE)}catch(e){console.error(e)}}aE(),i7.exports=Kr;var Ln=i7.exports;const D$=nr(Ln);var sE,r8=Ln;sE=r8.createRoot,r8.hydrateRoot;/**
* @remix-run/router v1.7.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sd.apply(this,arguments)}var ua;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ua||(ua={}));const i8="popstate";function N$(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:a,hash:s}=r.location;return gb("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:lE(i)}return $$(t,n,null,e)}function ln(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fx(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function M$(){return Math.random().toString(36).substr(2,8)}function o8(e,t){return{usr:e.state,key:e.key,idx:t}}function gb(e,t,n,r){return n===void 0&&(n=null),sd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hc(t):t,{state:n,key:t&&t.key||r||M$()})}function lE(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function hc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function $$(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=ua.Pop,u=null,l=d();l==null&&(l=0,a.replaceState(sd({},a.state,{idx:l}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=ua.Pop;let _=d(),x=_==null?null:_-l;l=_,u&&u({action:s,location:v.location,delta:x})}function m(_,x){s=ua.Push;let S=gb(v.location,_,x);n&&n(S,_),l=d()+1;let C=o8(S,l),p=v.createHref(S);try{a.pushState(C,"",p)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(p)}o&&u&&u({action:s,location:v.location,delta:1})}function g(_,x){s=ua.Replace;let S=gb(v.location,_,x);n&&n(S,_),l=d();let C=o8(S,l),p=v.createHref(S);a.replaceState(C,"",p),o&&u&&u({action:s,location:v.location,delta:0})}function y(_){let x=i.location.origin!=="null"?i.location.origin:i.location.href,S=typeof _=="string"?_:lE(_);return ln(x,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,x)}let v={get action(){return s},get location(){return e(i,a)},listen(_){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(i8,f),u=_,()=>{i.removeEventListener(i8,f),u=null}},createHref(_){return t(i,_)},createURL:y,encodeLocation(_){let x=y(_);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(_){return a.go(_)}};return v}var a8;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(a8||(a8={}));function L$(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?hc(t):t,i=dE(r.pathname||"/",n);if(i==null)return null;let o=cE(e);F$(o);let a=null;for(let s=0;a==null&&s<o.length;++s)a=K$(o[s],Q$(i));return a}function cE(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,a,s)=>{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(ln(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=hs([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(ln(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),cE(o.children,t,d,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:q$(l,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of uE(o.path))i(o,a,u)}),t}function uE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=uE(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function F$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:G$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const z$=/^:\w+$/,B$=3,H$=2,U$=1,W$=10,V$=-2,s8=e=>e==="*";function q$(e,t){let n=e.split("/"),r=n.length;return n.some(s8)&&(r+=V$),t&&(r+=H$),n.filter(i=>!s8(i)).reduce((i,o)=>i+(z$.test(o)?B$:o===""?U$:W$),r)}function G$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function K$(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a<n.length;++a){let s=n[a],u=a===n.length-1,l=i==="/"?t:t.slice(i.length)||"/",d=Y$({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!d)return null;Object.assign(r,d.params);let f=s.route;o.push({params:r,pathname:hs([i,d.pathname]),pathnameBase:rL(hs([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=hs([i,d.pathnameBase]))}return o}function Y$(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=X$(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((l,d,f)=>{if(d==="*"){let m=s[f]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}return l[d]=J$(s[f]||"",d),l},{}),pathname:o,pathnameBase:a,pattern:e}}function X$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),fx(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Q$(e){try{return decodeURI(e)}catch(t){return fx(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function J$(e,t){try{return decodeURIComponent(e)}catch(n){return fx(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function dE(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Z$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?hc(e):e;return{pathname:n?n.startsWith("/")?n:eL(n,t):t,search:iL(r),hash:oL(i)}}function eL(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function mv(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tL(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nL(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=hc(e):(i=sd({},e),ln(!i.pathname||!i.pathname.includes("?"),mv("?","pathname","search",i)),ln(!i.pathname||!i.pathname.includes("#"),mv("#","pathname","hash",i)),ln(!i.search||!i.search.includes("#"),mv("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(r||a==null)s=n;else{let f=t.length-1;if(a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}s=f>=0?t[f]:"/"}let u=Z$(i,s),l=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||d)&&(u.pathname+="/"),u}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),rL=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fE=["post","put","patch","delete"];new Set(fE);const sL=["get",...fE];new Set(sL);/**
* React Router v6.14.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nh.apply(this,arguments)}const px=h.createContext(null),lL=h.createContext(null),Wm=h.createContext(null),Ud=h.createContext(null),mc=h.createContext({outlet:null,matches:[],isDataRoute:!1}),pE=h.createContext(null);function Vm(){return h.useContext(Ud)!=null}function Ms(){return Vm()||ln(!1),h.useContext(Ud).location}function hE(){return h.useContext(Ud).navigationType}function mE(e){h.useContext(Wm).static||h.useLayoutEffect(e)}function xt(){let{isDataRoute:e}=h.useContext(mc);return e?xL():cL()}function cL(){Vm()||ln(!1);let e=h.useContext(px),{basename:t,navigator:n}=h.useContext(Wm),{matches:r}=h.useContext(mc),{pathname:i}=Ms(),o=JSON.stringify(tL(r).map(u=>u.pathnameBase)),a=h.useRef(!1);return mE(()=>{a.current=!0}),h.useCallback(function(u,l){if(l===void 0&&(l={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=nL(u,JSON.parse(o),i,l.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:hs([t,d.pathname])),(l.replace?n.replace:n.push)(d,l.state,l)},[t,n,o,i,e])}function uL(e,t){return dL(e,t)}function dL(e,t,n){Vm()||ln(!1);let{navigator:r}=h.useContext(Wm),{matches:i}=h.useContext(mc),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let u=Ms(),l;if(t){var d;let v=typeof t=="string"?hc(t):t;s==="/"||(d=v.pathname)!=null&&d.startsWith(s)||ln(!1),l=v}else l=u;let f=l.pathname||"/",m=s==="/"?f:f.slice(s.length)||"/",g=L$(e,{pathname:m}),y=gL(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:hs([s,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:hs([s,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n);return t&&y?h.createElement(Ud.Provider,{value:{location:Nh({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:ua.Pop}},y):y}function fL(){let e=wL(),t=aL(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:i},n):null,o)}const pL=h.createElement(fL,null);class hL extends h.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?h.createElement(mc.Provider,{value:this.props.routeContext},h.createElement(pE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mL(e){let{routeContext:t,match:n,children:r}=e,i=h.useContext(px);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(mc.Provider,{value:t},r)}function gL(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id]));s>=0||ln(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,u,l)=>{let d=u.route.id?a==null?void 0:a[u.route.id]:null,f=null;n&&(f=u.route.errorElement||pL);let m=t.concat(o.slice(0,l+1)),g=()=>{let y;return d?y=f:u.route.Component?y=h.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=s,h.createElement(mL,{match:u,routeContext:{outlet:s,matches:m,isDataRoute:n!=null},children:y})};return n&&(u.route.ErrorBoundary||u.route.errorElement||l===0)?h.createElement(hL,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var vb;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(vb||(vb={}));var ld;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(ld||(ld={}));function vL(e){let t=h.useContext(px);return t||ln(!1),t}function yL(e){let t=h.useContext(lL);return t||ln(!1),t}function bL(e){let t=h.useContext(mc);return t||ln(!1),t}function gE(e){let t=bL(),n=t.matches[t.matches.length-1];return n.route.id||ln(!1),n.route.id}function wL(){var e;let t=h.useContext(pE),n=yL(ld.UseRouteError),r=gE(ld.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function xL(){let{router:e}=vL(vb.UseNavigateStable),t=gE(ld.UseNavigateStable),n=h.useRef(!1);return mE(()=>{n.current=!0}),h.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Nh({fromRouteId:t},o)))},[e,t])}function En(e){ln(!1)}function SL(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ua.Pop,navigator:o,static:a=!1}=e;Vm()&&ln(!1);let s=t.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=hc(r));let{pathname:l="/",search:d="",hash:f="",state:m=null,key:g="default"}=r,y=h.useMemo(()=>{let v=dE(l,s);return v==null?null:{location:{pathname:v,search:d,hash:f,state:m,key:g},navigationType:i}},[s,l,d,f,m,g,i]);return y==null?null:h.createElement(Wm.Provider,{value:u},h.createElement(Ud.Provider,{children:n,value:y}))}function CL(e){let{children:t,location:n}=e;return uL(yb(t),n)}var l8;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(l8||(l8={}));new Promise(()=>{});function yb(e,t){t===void 0&&(t=[]);let n=[];return h.Children.forEach(e,(r,i)=>{if(!h.isValidElement(r))return;let o=[...t,i];if(r.type===h.Fragment){n.push.apply(n,yb(r.props.children,o));return}r.type!==En&&ln(!1),!r.props.index||!r.props.children||ln(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=yb(r.props.children,o)),n.push(a)}),n}/**
* React Router DOM v6.14.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function bb(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function _L(e,t){let n=bb(e);if(t)for(let r of t.keys())n.has(r)||t.getAll(r).forEach(i=>{n.append(r,i)});return n}const kL="startTransition",c8=n7[kL];function jL(e){let{basename:t,children:n,future:r,window:i}=e,o=h.useRef();o.current==null&&(o.current=N$({window:i,v5Compat:!0}));let a=o.current,[s,u]=h.useState({action:a.action,location:a.location}),{v7_startTransition:l}=r||{},d=h.useCallback(f=>{l&&c8?c8(()=>u(f)):u(f)},[u,l]);return h.useLayoutEffect(()=>a.listen(d),[a,d]),h.createElement(SL,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}var u8;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(u8||(u8={}));var d8;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(d8||(d8={}));function EL(e){let t=h.useRef(bb(e)),n=h.useRef(!1),r=Ms(),i=h.useMemo(()=>_L(r.search,n.current?null:t.current),[r.search]),o=xt(),a=h.useCallback((s,u)=>{const l=bb(typeof s=="function"?s(i):s);n.current=!0,o("?"+l,u)},[o,i]);return[i,a]}var vE={exports:{}},RL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PL=RL,AL=PL;function yE(){}function bE(){}bE.resetWarningCache=yE;var IL=function(){function e(r,i,o,a,s,u){if(u!==AL){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:bE,resetWarningCache:yE};return n.PropTypes=n,n};vE.exports=IL();var TL=vE.exports;const te=nr(TL);var OL=typeof Element<"u",DL=typeof Map=="function",NL=typeof Set=="function",ML=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Lp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Lp(e[r],t[r]))return!1;return!0}var o;if(DL&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Lp(r.value[1],t.get(r.value[0])))return!1;return!0}if(NL&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(ML&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(OL&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Lp(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var $L=function(t,n){try{return Lp(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const LL=nr($L);var FL=function(e,t,n,r,i,o,a,s){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],d=0;u=new Error(t.replace(/%s/g,function(){return l[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},zL=FL;const f8=nr(zL);var BL=function(t,n,r,i){var o=r?r.call(i,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),s=Object.keys(n);if(a.length!==s.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),l=0;l<a.length;l++){var d=a[l];if(!u(d))return!1;var f=t[d],m=n[d];if(o=r?r.call(i,f,m,d):void 0,o===!1||o===void 0&&f!==m)return!1}return!0};const wE=nr(BL);function Kt(){return Kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kt.apply(this,arguments)}function hx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wb(e,t)}function wb(e,t){return wb=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wb(e,t)}function p8(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Te={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},HL={rel:["amphtml","canonical","alternate"]},UL={type:["application/ld+json"]},WL={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},h8=Object.keys(Te).map(function(e){return Te[e]}),Mh={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},VL=Object.keys(Mh).reduce(function(e,t){return e[Mh[t]]=t,e},{}),Ll=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},qL=function(e){var t=Ll(e,Te.TITLE),n=Ll(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=Ll(e,"defaultTitle");return t||r||void 0},GL=function(e){return Ll(e,"onChangeClientState")||function(){}},gv=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,r){return Kt({},n,r)},{})},KL=function(e,t){return t.filter(function(n){return n[Te.BASE]!==void 0}).map(function(n){return n[Te.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var i=Object.keys(r),o=0;o<i.length;o+=1){var a=i[o].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}return n},[])},Xc=function(e,t,n){var r={};return n.filter(function(i){return!!Array.isArray(i[e])||(i[e]!==void 0&&console&&typeof console.warn=="function"&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof i[e]+'"'),!1)}).map(function(i){return i[e]}).reverse().reduce(function(i,o){var a={};o.filter(function(f){for(var m,g=Object.keys(f),y=0;y<g.length;y+=1){var v=g[y],_=v.toLowerCase();t.indexOf(_)===-1||m==="rel"&&f[m].toLowerCase()==="canonical"||_==="rel"&&f[_].toLowerCase()==="stylesheet"||(m=_),t.indexOf(v)===-1||v!=="innerHTML"&&v!=="cssText"&&v!=="itemprop"||(m=v)}if(!m||!f[m])return!1;var x=f[m].toLowerCase();return r[m]||(r[m]={}),a[m]||(a[m]={}),!r[m][x]&&(a[m][x]=!0,!0)}).reverse().forEach(function(f){return i.push(f)});for(var s=Object.keys(a),u=0;u<s.length;u+=1){var l=s[u],d=Kt({},r[l],a[l]);r[l]=d}return i},[]).reverse()},YL=function(e,t){if(Array.isArray(e)&&e.length){for(var n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},xE=function(e){return Array.isArray(e)?e.join(""):e},vv=function(e,t){return Array.isArray(e)?e.reduce(function(n,r){return function(i,o){for(var a=Object.keys(i),s=0;s<a.length;s+=1)if(o[a[s]]&&o[a[s]].includes(i[a[s]]))return!0;return!1}(r,t)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:e}},m8=function(e,t){var n;return Kt({},e,((n={})[t]=void 0,n))},XL=[Te.NOSCRIPT,Te.SCRIPT,Te.STYLE],yv=function(e,t){return t===void 0&&(t=!0),t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},g8=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},v8=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,r){return n[Mh[r]||r]=e[r],n},t)},Fp=function(e,t){return t.map(function(n,r){var i,o=((i={key:r})["data-rh"]=!0,i);return Object.keys(n).forEach(function(a){var s=Mh[a]||a;s==="innerHTML"||s==="cssText"?o.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:o[s]=n[a]}),le.createElement(e,o)})},ri=function(e,t,n){switch(e){case Te.TITLE:return{toComponent:function(){return i=t.titleAttributes,(o={key:r=t.title})["data-rh"]=!0,a=v8(i,o),[le.createElement(Te.TITLE,a,r)];var r,i,o,a},toString:function(){return function(r,i,o,a){var s=g8(o),u=xE(i);return s?"<"+r+' data-rh="true" '+s+">"+yv(u,a)+"</"+r+">":"<"+r+' data-rh="true">'+yv(u,a)+"</"+r+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return v8(t)},toString:function(){return g8(t)}};default:return{toComponent:function(){return Fp(e,t)},toString:function(){return function(r,i,o){return i.reduce(function(a,s){var u=Object.keys(s).filter(function(f){return!(f==="innerHTML"||f==="cssText")}).reduce(function(f,m){var g=s[m]===void 0?m:m+'="'+yv(s[m],o)+'"';return f?f+" "+g:g},""),l=s.innerHTML||s.cssText||"",d=XL.indexOf(r)===-1;return a+"<"+r+' data-rh="true" '+u+(d?"/>":">"+l+"</"+r+">")},"")}(e,t,n)}}}},xb=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,o=e.noscriptTags,a=e.styleTags,s=e.title,u=s===void 0?"":s,l=e.titleAttributes,d=e.linkTags,f=e.metaTags,m=e.scriptTags,g={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var y=function(v){var _=v.linkTags,x=v.scriptTags,S=v.encode,C=vv(v.metaTags,WL),p=vv(_,HL),w=vv(x,UL);return{priorityMethods:{toComponent:function(){return[].concat(Fp(Te.META,C.priority),Fp(Te.LINK,p.priority),Fp(Te.SCRIPT,w.priority))},toString:function(){return ri(Te.META,C.priority,S)+" "+ri(Te.LINK,p.priority,S)+" "+ri(Te.SCRIPT,w.priority,S)}},metaTags:C.default,linkTags:p.default,scriptTags:w.default}}(e);g=y.priorityMethods,d=y.linkTags,f=y.metaTags,m=y.scriptTags}return{priority:g,base:ri(Te.BASE,t,r),bodyAttributes:ri("bodyAttributes",n,r),htmlAttributes:ri("htmlAttributes",i,r),link:ri(Te.LINK,d,r),meta:ri(Te.META,f,r),noscript:ri(Te.NOSCRIPT,o,r),script:ri(Te.SCRIPT,m,r),style:ri(Te.STYLE,a,r),title:ri(Te.TITLE,{title:u,titleAttributes:l},r)}},Df=[],Sb=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(r){n.context.helmet=r},helmetInstances:{get:function(){return n.canUseDOM?Df:n.instances},add:function(r){(n.canUseDOM?Df:n.instances).push(r)},remove:function(r){var i=(n.canUseDOM?Df:n.instances).indexOf(r);(n.canUseDOM?Df:n.instances).splice(i,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=xb({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},SE=le.createContext({}),QL=te.shape({setHelmet:te.func,helmetInstances:te.shape({get:te.func,add:te.func,remove:te.func})}),JL=typeof document<"u",Pl=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new Sb(r.props.context,t.canUseDOM),r}return hx(t,e),t.prototype.render=function(){return le.createElement(SE.Provider,{value:this.helmetData.value},this.props.children)},t}(h.Component);Pl.canUseDOM=JL,Pl.propTypes={context:te.shape({helmet:te.shape()}),children:te.node.isRequired},Pl.defaultProps={context:{}},Pl.displayName="HelmetProvider";var el=function(e,t){var n,r=document.head||document.querySelector(Te.HEAD),i=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(i),a=[];return t&&t.length&&t.forEach(function(s){var u=document.createElement(e);for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(l==="innerHTML"?u.innerHTML=s.innerHTML:l==="cssText"?u.styleSheet?u.styleSheet.cssText=s.cssText:u.appendChild(document.createTextNode(s.cssText)):u.setAttribute(l,s[l]===void 0?"":s[l]));u.setAttribute("data-rh","true"),o.some(function(d,f){return n=f,u.isEqualNode(d)})?o.splice(n,1):a.push(u)}),o.forEach(function(s){return s.parentNode.removeChild(s)}),a.forEach(function(s){return r.appendChild(s)}),{oldTags:o,newTags:a}},bv=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(t),s=0;s<a.length;s+=1){var u=a[s],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),i.indexOf(u)===-1&&i.push(u);var d=o.indexOf(u);d!==-1&&o.splice(d,1)}for(var f=o.length-1;f>=0;f-=1)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute("data-rh",a.join(","))}},y8=function(e,t){var n=e.baseTag,r=e.htmlAttributes,i=e.linkTags,o=e.metaTags,a=e.noscriptTags,s=e.onChangeClientState,u=e.scriptTags,l=e.styleTags,d=e.title,f=e.titleAttributes;bv(Te.BODY,e.bodyAttributes),bv(Te.HTML,r),function(v,_){v!==void 0&&document.title!==v&&(document.title=xE(v)),bv(Te.TITLE,_)}(d,f);var m={baseTag:el(Te.BASE,n),linkTags:el(Te.LINK,i),metaTags:el(Te.META,o),noscriptTags:el(Te.NOSCRIPT,a),scriptTags:el(Te.SCRIPT,u),styleTags:el(Te.STYLE,l)},g={},y={};Object.keys(m).forEach(function(v){var _=m[v],x=_.newTags,S=_.oldTags;x.length&&(g[v]=x),S.length&&(y[v]=m[v].oldTags)}),t&&t(),s(e,g,y)},Qc=null,$h=function(e){function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))||this).rendered=!1,r}hx(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!wE(r,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var r,i,o=this.props.context,a=o.setHelmet,s=null,u=(r=o.helmetInstances.get().map(function(l){var d=Kt({},l.props);return delete d.context,d}),{baseTag:KL(["href"],r),bodyAttributes:gv("bodyAttributes",r),defer:Ll(r,"defer"),encode:Ll(r,"encodeSpecialCharacters"),htmlAttributes:gv("htmlAttributes",r),linkTags:Xc(Te.LINK,["rel","href"],r),metaTags:Xc(Te.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:Xc(Te.NOSCRIPT,["innerHTML"],r),onChangeClientState:GL(r),scriptTags:Xc(Te.SCRIPT,["src","innerHTML"],r),styleTags:Xc(Te.STYLE,["cssText"],r),title:qL(r),titleAttributes:gv("titleAttributes",r),prioritizeSeoTags:YL(r,"prioritizeSeoTags")});Pl.canUseDOM?(i=u,Qc&&cancelAnimationFrame(Qc),i.defer?Qc=requestAnimationFrame(function(){y8(i,function(){Qc=null})}):(y8(i),Qc=null)):xb&&(s=xb(u)),a(s)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(h.Component);$h.propTypes={context:QL.isRequired},$h.displayName="HelmetDispatcher";var ZL=["children"],eF=["children"],zp=function(e){function t(){return e.apply(this,arguments)||this}hx(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!LL(m8(this.props,"helmetData"),m8(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,i){if(!i)return null;switch(r.type){case Te.SCRIPT:case Te.NOSCRIPT:return{innerHTML:i};case Te.STYLE:return{cssText:i};default:throw new Error("<"+r.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(r){var i,o=r.child,a=r.arrayTypeChildren;return Kt({},a,((i={})[o.type]=[].concat(a[o.type]||[],[Kt({},r.newChildProps,this.mapNestedChildrenToProps(o,r.nestedChildren))]),i))},n.mapObjectTypeChildren=function(r){var i,o,a=r.child,s=r.newProps,u=r.newChildProps,l=r.nestedChildren;switch(a.type){case Te.TITLE:return Kt({},s,((i={})[a.type]=l,i.titleAttributes=Kt({},u),i));case Te.BODY:return Kt({},s,{bodyAttributes:Kt({},u)});case Te.HTML:return Kt({},s,{htmlAttributes:Kt({},u)});default:return Kt({},s,((o={})[a.type]=Kt({},u),o))}},n.mapArrayTypeChildrenToProps=function(r,i){var o=Kt({},i);return Object.keys(r).forEach(function(a){var s;o=Kt({},o,((s={})[a]=r[a],s))}),o},n.warnOnInvalidChildren=function(r,i){return f8(h8.some(function(o){return r.type===o}),typeof r.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+h8.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),f8(!i||typeof i=="string"||Array.isArray(i)&&!i.some(function(o){return typeof o!="string"}),"Helmet expects a string as a child of <"+r.type+">. Did you forget to wrap your children in braces? ( <"+r.type+">{``}</"+r.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(r,i){var o=this,a={};return le.Children.forEach(r,function(s){if(s&&s.props){var u=s.props,l=u.children,d=p8(u,ZL),f=Object.keys(d).reduce(function(g,y){return g[VL[y]||y]=d[y],g},{}),m=s.type;switch(typeof m=="symbol"?m=m.toString():o.warnOnInvalidChildren(s,l),m){case Te.FRAGMENT:i=o.mapChildrenToProps(l,i);break;case Te.LINK:case Te.META:case Te.NOSCRIPT:case Te.SCRIPT:case Te.STYLE:a=o.flattenArrayTypeChildren({child:s,arrayTypeChildren:a,newChildProps:f,nestedChildren:l});break;default:i=o.mapObjectTypeChildren({child:s,newProps:i,newChildProps:f,nestedChildren:l})}}}),this.mapArrayTypeChildrenToProps(a,i)},n.render=function(){var r=this.props,i=r.children,o=p8(r,eF),a=Kt({},o),s=o.helmetData;return i&&(a=this.mapChildrenToProps(i,a)),!s||s instanceof Sb||(s=new Sb(s.context,s.instances)),s?le.createElement($h,Kt({},a,{context:s.value,helmetData:void 0})):le.createElement(SE.Consumer,null,function(u){return le.createElement($h,Kt({},a,{context:u}))})},t}(h.Component);zp.propTypes={base:te.object,bodyAttributes:te.object,children:te.oneOfType([te.arrayOf(te.node),te.node]),defaultTitle:te.string,defer:te.bool,encodeSpecialCharacters:te.bool,htmlAttributes:te.object,link:te.arrayOf(te.object),meta:te.arrayOf(te.object),noscript:te.arrayOf(te.object),onChangeClientState:te.func,script:te.arrayOf(te.object),style:te.arrayOf(te.object),title:te.string,titleAttributes:te.object,titleTemplate:te.string,prioritizeSeoTags:te.bool,helmetData:te.object},zp.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},zp.displayName="Helmet";var wv=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},b8=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cb=new Map;function tF(){for(var e,t,n,r,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];try{for(var u=wv(a),l=u.next();!l.done;l=u.next()){var d=l.value;try{for(var f=(n=void 0,wv(Object.entries(d.classes))),m=f.next();!m.done;m=f.next()){var g=b8(m.value,2),y=g[0],v=g[1];Cb.set(v,y)}}catch(C){n={error:C}}finally{try{m&&!m.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}try{for(var _=(i=void 0,wv(Object.entries(d.properties))),x=_.next();!x.done;x=_.next()){var S=b8(x.value,2),y=S[0],v=S[1];Cb.set(v,y)}}catch(C){i={error:C}}finally{try{x&&!x.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}}}catch(C){e={error:C}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}}function nF(e){return Cb.get(e)}var ve={classes:{class:"https://atomicdata.dev/classes/Class",property:"https://atomicdata.dev/classes/Property",agent:"https://atomicdata.dev/classes/Agent",datatype:"https://atomicdata.dev/classes/Datatype",ontology:"https://atomicdata.dev/class/ontology"},properties:{allowsOnly:"https://atomicdata.dev/properties/allowsOnly",classtype:"https://atomicdata.dev/properties/classtype",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",write:"https://atomicdata.dev/properties/write",publicKey:"https://atomicdata.dev/properties/publicKey",instances:"https://atomicdata.dev/properties/instances",properties:"https://atomicdata.dev/properties/properties",classes:"https://atomicdata.dev/properties/classes",isLocked:"https://atomicdata.dev/properties/isLocked"}},_b={classes:{commit:"https://atomicdata.dev/classes/Commit"},properties:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"}},eo={classes:{collection:"https://atomicdata.dev/classes/Collection"},properties:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value",sortBy:"https://atomicdata.dev/properties/collection/sortBy",sortDesc:"https://atomicdata.dev/properties/collection/sortDesc",includeExternal:"https://atomicdata.dev/properties/collection/includeExternal"}},Be={classes:{chatroom:"https://atomicdata.dev/classes/ChatRoom",document:"https://atomicdata.dev/classes/Document",bookmark:"https://atomicdata.dev/class/Bookmark",paragraph:"https://atomicdata.dev/classes/elements/Paragraph",message:"https://atomicdata.dev/classes/Message",importer:"https://atomicdata.dev/classes/Importer",folder:"https://atomicdata.dev/classes/Folder",article:"https://atomicdata.dev/classes/Article",displayStyle:"https://atomicdata.dev/class/DisplayStyle",dateFormat:"https://atomicdata.dev/classes/DateFormat",numberFormat:"https://atomicdata.dev/classes/NumberFormat",rangeProperty:"https://atomicdata.dev/classes/RangeProperty",floatRangeProperty:"https://atomicdata.dev/classes/FloatRangeProperty",formattedNumber:"https://atomicdata.dev/classes/FormattedNumber",selectProperty:"https://atomicdata.dev/classes/SelectProperty",formattedDate:"https://atomicdata.dev/classes/FormattedDate",table:"https://atomicdata.dev/classes/Table",tag:"https://atomicdata.dev/classes/Tag",currencyProperty:"https://atomicdata.dev/ontology/data-browser/class/currency-property"},properties:{subResources:"https://atomicdata.dev/properties/subresources",displayStyle:"https://atomicdata.dev/property/display-style",publishedAt:"https://atomicdata.dev/properties/published-at",elements:"https://atomicdata.dev/properties/documents/elements",messages:"https://atomicdata.dev/properties/messages",nextPage:"https://atomicdata.dev/properties/nextPage",replyTo:"https://atomicdata.dev/properties/replyTo",url:"https://atomicdata.dev/property/url",preview:"https://atomicdata.dev/property/preview",imageUrl:"https://atomicdata.dev/properties/imageUrl",max:"https://atomicdata.dev/properties/max",min:"https://atomicdata.dev/properties/min",maxFloat:"https://atomicdata.dev/properties/maxFloat",minFloat:"https://atomicdata.dev/properties/minFloat",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",dateFormat:"https://atomicdata.dev/properties/dateFormat",tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths",customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning",color:"https://atomicdata.dev/properties/color",emoji:"https://atomicdata.dev/properties/emoji",tags:"https://atomicdata.dev/properties/tags",currency:"https://atomicdata.dev/ontology/data-browser/property/currency"}},xa={classes:{error:"https://atomicdata.dev/classes/Error",endpoint:"https://atomicdata.dev/classes/Endpoint",drive:"https://atomicdata.dev/classes/Drive",redirect:"https://atomicdata.dev/classes/Redirect",file:"https://atomicdata.dev/classes/File",invite:"https://atomicdata.dev/classes/Invite",endpointResponse:"https://atomicdata.dev/ontology/server/class/endpoint-response"},properties:{drives:"https://atomicdata.dev/properties/drives",results:"https://atomicdata.dev/properties/endpoint/results",property:"https://atomicdata.dev/properties/search/property",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent",agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write",filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments",createdBy:"https://atomicdata.dev/properties/createdBy",checksum:"https://atomicdata.dev/properties/checksum",internalId:"https://atomicdata.dev/properties/internalId",children:"https://atomicdata.dev/properties/children",parameters:"https://atomicdata.dev/properties/endpoint/parameters",destination:"https://atomicdata.dev/properties/destination",status:"https://atomicdata.dev/ontology/server/property/status",responseMessage:"https://atomicdata.dev/ontology/server/property/response-message"}};function rF(){tF(ve,_b,eo,Be,xa)}var w8=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},x8=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Lh=function(){function e(t,n){if(n&&bn.tryValidSubject(n),!t)throw new Nr("Agent requires a private key");this.client=new bn,this.subject=n,this.privateKey=t}return e.fromSecret=function(t){var n=atob(t),r=JSON.parse(n),i=r.privateKey,o=r.subject,a=new e(i,o);return a},e.prototype.getPublicKey=function(){return w8(this,void 0,void 0,function(){var t;return x8(this,function(n){switch(n.label){case 0:return this.publicKey?[3,2]:[4,KF(this.privateKey)];case 1:t=n.sent(),this.publicKey=t,n.label=2;case 2:return[2,this.publicKey]}})})},e.prototype.buildSecret=function(){var t=JSON.stringify(this);return btoa(t)},e.prototype.verifyPublicKeyWithServer=function(){var t;return w8(this,void 0,void 0,function(){var n,r,i;return x8(this,function(o){switch(o.label){case 0:if(!this.subject)throw new Nr("Agent has no subject");return[4,this.client.fetchResourceHTTP(this.subject)];case 1:if(n=o.sent().resource,n.error)throw new Error("Could not fetch agent, and could therefore not check validity of public key. ".concat(n.error));return r=(t=n.get(K.agent.publicKey))===null||t===void 0?void 0:t.toString(),i=r,[4,this.getPublicKey()];case 2:if(i!==o.sent())throw new Error("Fetched publickey does not match current one - is the private key correct?");return[2]}})})},e}(),mx=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},gx=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};function vx(e,t){return mx(this,void 0,void 0,function(){var n,r,i,o,a;return gx(this,function(s){switch(s.label){case 0:if(n=Vd(),!t.subject)throw new Error("Agent has no subject, cannot authenticate");return a={"https://atomicdata.dev/properties/auth/agent":t.subject,"https://atomicdata.dev/properties/auth/requestedSubject":e},i="https://atomicdata.dev/properties/auth/publicKey",[4,t.getPublicKey()];case 1:return a[i]=s.sent(),a["https://atomicdata.dev/properties/auth/timestamp"]=n,o="https://atomicdata.dev/properties/auth/signature",[4,CE(e,t,n)];case 2:return r=(a[o]=s.sent(),a),[2,r]}})})}function CE(e,t,n){return mx(this,void 0,void 0,function(){var r;return gx(this,function(i){switch(i.label){case 0:return r="".concat(e," ").concat(n),[4,ME(r,t.privateKey)];case 1:return[2,i.sent()]}})})}function iF(e,t){var n;return!e.startsWith("http://localhost")&&((n=t==null?void 0:t.subject)===null||n===void 0?void 0:n.startsWith("http://localhost"))}function kb(e,t,n){return mx(this,void 0,void 0,function(){var r,i,o,a,s;return gx(this,function(u){switch(u.label){case 0:return r=Vd(),t!=null&&t.subject&&!iF(e,t)?(i=n,o="x-atomic-public-key",[4,t.getPublicKey()]):[3,3];case 1:return i[o]=u.sent(),a=n,s="x-atomic-signature",[4,CE(e,t,r)];case 2:a[s]=u.sent(),n["x-atomic-timestamp"]=r,n["x-atomic-agent"]=t==null?void 0:t.subject,u.label=3;case 3:return[2,n]}})})}var oF=24*60*60*1e3,aF=function(e,t,n,r){r===void 0&&(r=oF);var i=new Date(Date.now()+r).toUTCString(),o=encodeURIComponent(t),a=new URL(n).hostname,s="".concat(e,"=").concat(o,";Expires=").concat(i,";Domain=").concat(a,";SameSite=Lax;path=/");document.cookie=s},_E="atomic_session",kE=function(e,t){vx(e,t).then(function(n){aF(_E,btoa(JSON.stringify(n)),e)})},sF=function(){var e=document.cookie.match(/^(.*;)?\s*atomic_session\s*=\s*[^;]+(.*)?$/);return e?e.length>0:!1},lF=function(){document.cookie="".concat(_E,"=;Max-Age=-99999999")},cF=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},uF=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};function dF(e,t){return cF(this,void 0,void 0,function(){function n(s,u){var l="/** ".concat(s.description,"*/"),d='"'.concat(s.shortname,'"').concat(u?"":"?"),f=fF(s.datatype);return" ".concat(l,`
`).concat(d,": ").concat(f,`;
`)}var r,i,o,a;return uF(this,function(s){switch(s.label){case 0:return[4,Promise.all(e.getSubjects(K.requires).map(function(u){return t.getProperty(u)}))];case 1:return r=s.sent(),[4,Promise.all(e.getSubjects(K.recommends).map(function(u){return t.getProperty(u)}))];case 2:return i=s.sent(),o=e.get(K.shortname),a="interface ".concat(o,` {
`),r.forEach(function(u){a=a.concat(n(u,!0))}),i.forEach(function(u){a=a.concat(n(u,!1))}),a=a.concat("}"),[2,a]}})})}function fF(e){switch(e){case Z.ATOMIC_URL:return"string | Resource";case Z.BOOLEAN:return"boolean";case Z.DATE:return"string";case Z.FLOAT:return"number";case Z.INTEGER:return"number";case Z.MARKDOWN:return"string";case Z.RESOURCEARRAY:return"string[] | Resource[]";case Z.SLUG:return"string";case Z.STRING:return"string";case Z.TIMESTAMP:return"number";case Z.UNKNOWN:return"unknown"}}function Bp(){return globalThis===globalThis.window}var jb={exports:{}};(function(e,t){var n=typeof self<"u"?self:xr,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function u(D){return D&&DataView.prototype.isPrototypeOf(D)}if(s.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(D){return D&&l.indexOf(Object.prototype.toString.call(D))>-1};function f(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(D))throw new TypeError("Invalid character in header field name");return D.toLowerCase()}function m(D){return typeof D!="string"&&(D=String(D)),D}function g(D){var L={next:function(){var T=D.shift();return{done:T===void 0,value:T}}};return s.iterable&&(L[Symbol.iterator]=function(){return L}),L}function y(D){this.map={},D instanceof y?D.forEach(function(L,T){this.append(T,L)},this):Array.isArray(D)?D.forEach(function(L){this.append(L[0],L[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(L){this.append(L,D[L])},this)}y.prototype.append=function(D,L){D=f(D),L=m(L);var T=this.map[D];this.map[D]=T?T+", "+L:L},y.prototype.delete=function(D){delete this.map[f(D)]},y.prototype.get=function(D){return D=f(D),this.has(D)?this.map[D]:null},y.prototype.has=function(D){return this.map.hasOwnProperty(f(D))},y.prototype.set=function(D,L){this.map[f(D)]=m(L)},y.prototype.forEach=function(D,L){for(var T in this.map)this.map.hasOwnProperty(T)&&D.call(L,this.map[T],T,this)},y.prototype.keys=function(){var D=[];return this.forEach(function(L,T){D.push(T)}),g(D)},y.prototype.values=function(){var D=[];return this.forEach(function(L){D.push(L)}),g(D)},y.prototype.entries=function(){var D=[];return this.forEach(function(L,T){D.push([T,L])}),g(D)},s.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function v(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function _(D){return new Promise(function(L,T){D.onload=function(){L(D.result)},D.onerror=function(){T(D.error)}})}function x(D){var L=new FileReader,T=_(L);return L.readAsArrayBuffer(D),T}function S(D){var L=new FileReader,T=_(L);return L.readAsText(D),T}function C(D){for(var L=new Uint8Array(D),T=new Array(L.length),V=0;V<L.length;V++)T[V]=String.fromCharCode(L[V]);return T.join("")}function p(D){if(D.slice)return D.slice(0);var L=new Uint8Array(D.byteLength);return L.set(new Uint8Array(D)),L.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(D){this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:s.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:s.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():s.arrayBuffer&&s.blob&&u(D)?(this._bodyArrayBuffer=p(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||d(D))?this._bodyArrayBuffer=p(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var D=v(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(x)}),this.text=function(){var D=v(this);if(D)return D;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function k(D){var L=D.toUpperCase();return b.indexOf(L)>-1?L:D}function E(D,L){L=L||{};var T=L.body;if(D instanceof E){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,L.headers||(this.headers=new y(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!T&&D._bodyInit!=null&&(T=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new y(L.headers)),this.method=k(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function I(D){var L=new FormData;return D.trim().split("&").forEach(function(T){if(T){var V=T.split("="),H=V.shift().replace(/\+/g," "),q=V.join("=").replace(/\+/g," ");L.append(decodeURIComponent(H),decodeURIComponent(q))}}),L}function j(D){var L=new y,T=D.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(V){var H=V.split(":"),q=H.shift().trim();if(q){var N=H.join(":").trim();L.append(q,N)}}),L}w.call(E.prototype);function P(D,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new y(L.headers),this.url=L.url||"",this._initBody(D)}w.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},P.error=function(){var D=new P(null,{status:0,statusText:""});return D.type="error",D};var B=[301,302,303,307,308];P.redirect=function(D,L){if(B.indexOf(L)===-1)throw new RangeError("Invalid status code");return new P(null,{status:L,headers:{location:D}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,T){this.message=L,this.name=T;var V=Error(L);this.stack=V.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function W(D,L){return new Promise(function(T,V){var H=new E(D,L);if(H.signal&&H.signal.aborted)return V(new a.DOMException("Aborted","AbortError"));var q=new XMLHttpRequest;function N(){q.abort()}q.onload=function(){var J={status:q.status,statusText:q.statusText,headers:j(q.getAllResponseHeaders()||"")};J.url="responseURL"in q?q.responseURL:J.headers.get("X-Request-URL");var se="response"in q?q.response:q.responseText;T(new P(se,J))},q.onerror=function(){V(new TypeError("Network request failed"))},q.ontimeout=function(){V(new TypeError("Network request failed"))},q.onabort=function(){V(new a.DOMException("Aborted","AbortError"))},q.open(H.method,H.url,!0),H.credentials==="include"?q.withCredentials=!0:H.credentials==="omit"&&(q.withCredentials=!1),"responseType"in q&&s.blob&&(q.responseType="blob"),H.headers.forEach(function(J,se){q.setRequestHeader(se,J)}),H.signal&&(H.signal.addEventListener("abort",N),q.onreadystatechange=function(){q.readyState===4&&H.signal.removeEventListener("abort",N)}),q.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return W.polyfill=!0,o.fetch||(o.fetch=W,o.Headers=y,o.Request=E,o.Response=P),a.Headers=y,a.Request=E,a.Response=P,a.fetch=W,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(jb,jb.exports);var pF=jb.exports;const hF=nr(pF);var Eb=function(){return Eb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Eb.apply(this,arguments)},xv=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Sv=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Cv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},mF=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},gF=function(e){return"blob"in e&&"name"in e},vF="application/ad+json",bn=function(){function e(t){this.__fetchOverride=t}return Object.defineProperty(e.prototype,"fetch",{get:function(){var t,n=(t=this.__fetchOverride)!==null&&t!==void 0?t:hF;if(typeof n>"u")throw new Nr("No fetch available, If the current environment doesn't have a fetch implementation you can pass one yourself.");return n},enumerable:!1,configurable:!0}),e.tryValidSubject=function(t){try{new URL(t)}catch(n){throw new Error("Not a valid URL: ".concat(t,". ").concat(n))}},e.isValidSubject=function(t){if(typeof t!="string")return!1;try{return e.tryValidSubject(t),!0}catch{return!1}},e.removeQueryParamsFromURL=function(t){return t==null?void 0:t.split("?")[0]},e.prototype.setFetch=function(t){this.__fetchOverride=t},e.prototype.fetchResourceHTTP=function(t,n){return n===void 0&&(n={}),xv(this,void 0,void 0,function(){var r,i,o,a,s,u,l,d,f,m,g,y,v,_,x,S,C;return Sv(this,function(p){switch(p.label){case 0:r=n.signInfo,i=n.from,o=n.body,a=n.method,s=[],u=new _s,l=new Fi(t),p.label=1;case 1:return p.trys.push([1,7,,8]),e.tryValidSubject(t),d={},d.Accept=vF,r?Bp()&&t.startsWith(window.location.origin)?(sF()||kE(r.serverURL,r.agent),[3,4]):[3,2]:[3,4];case 2:return[4,kb(t,r.agent,d)];case 3:p.sent(),p.label=4;case 4:return f=t,i!==void 0&&(m=new URL("".concat(i,"/path")),m.searchParams.set("path",t),f=m.href),[4,this.fetch(f,{headers:d,method:a??"GET",body:o})];case 5:return g=p.sent(),[4,g.text()];case 6:if(y=p.sent(),g.status===200)try{v=JSON.parse(y),n.noNested?l=v:(_=Cv(u.parseObject(v,t),2),x=_[0],S=_[1],l=x,s.push.apply(s,mF([],Cv(S),!1)))}catch(w){throw new Nr("Could not parse JSON from fetching ".concat(t,". Is it an Atomic Data resource? Error message: ").concat(w.message))}else throw g.status===401?new Nr(y,Mi.Unauthorized):g.status===500?new Nr(y,Mi.Server):g.status===404?new Nr(y,Mi.NotFound):new Nr(y);return[3,8];case 7:return C=p.sent(),l.setError(C),s=[l],console.error(t,C),[3,8];case 8:return l.loading=!1,[2,{resource:l,createdResources:s}]}})})},e.prototype.postCommit=function(t,n){return xv(this,void 0,void 0,function(){var r,i,o,a,s;return Sv(this,function(u){switch(u.label){case 0:r=NE(Eb({},t)),i=new Headers,i.set("Content-Type","application/ad+json"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.fetch(n,{headers:i,method:"POST",body:r})];case 2:return o=u.sent(),[3,4];case 3:throw a=u.sent(),new Nr("Posting Commit to ".concat(n," failed: ").concat(a));case 4:return[4,o.text()];case 5:if(s=u.sent(),o.status!==200)throw new Nr(s,Mi.Server);return[2,$E(s)]}})})},e.prototype.uploadFiles=function(t,n,r,i){return xv(this,void 0,void 0,function(){var o,a,s,u,l,d,f,m,g,y;return Sv(this,function(v){switch(v.label){case 0:return o=new _s,a=new FormData,t.map(function(_){gF(_)?a.append("assets",_.blob,_.name):a.append("assets",_,_.name)}),s=new URL("".concat(n,"/upload")),s.searchParams.set("parent",i),[4,kb(s.toString(),r,{})];case 1:return u=v.sent(),l={method:"POST",body:a,headers:u},[4,this.fetch(s.toString(),l)];case 2:return d=v.sent(),[4,d.text()];case 3:if(f=v.sent(),d.status!==200)throw Error(f);return m=JSON.parse(f),g=Cv(o.parseArray(m),1),y=g[0],[2,y]}})})},e}();const jE={},wxe=Object.freeze(Object.defineProperty({__proto__:null,default:jE},Symbol.toStringTag,{value:"Module"}));/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const vn=BigInt(0),et=BigInt(1),Jn=BigInt(2),EE=BigInt(255),S8=Jn**BigInt(252)+BigInt("27742317777372353535851937790883648493"),At={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:Jn**EE-BigInt(19),l:S8,n:S8,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")},RE=Jn**BigInt(256),Pu=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742");const yF=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),bF=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),wF=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),xF=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class pt{constructor(t,n,r,i){this.x=t,this.y=n,this.z=r,this.t=i}static fromAffine(t){if(!(t instanceof sn))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(sn.ZERO)?pt.ZERO:new pt(t.x,t.y,et,ne(t.x*t.y))}static toAffineBatch(t){const n=_F(t.map(r=>r.z));return t.map((r,i)=>r.toAffine(n[i]))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){C8(t);const{x:n,y:r,z:i}=this,{x:o,y:a,z:s}=t,u=ne(n*s),l=ne(o*i),d=ne(r*s),f=ne(a*i);return u===l&&d===f}negate(){return new pt(ne(-this.x),this.y,this.z,ne(-this.t))}double(){const{x:t,y:n,z:r}=this,{a:i}=At,o=ne(t**Jn),a=ne(n**Jn),s=ne(Jn*ne(r**Jn)),u=ne(i*o),l=ne(ne((t+n)**Jn)-o-a),d=u+a,f=d-s,m=u-a,g=ne(l*f),y=ne(d*m),v=ne(l*m),_=ne(f*d);return new pt(g,y,_,v)}add(t){C8(t);const{x:n,y:r,z:i,t:o}=this,{x:a,y:s,z:u,t:l}=t,d=ne((r-n)*(s+a)),f=ne((r+n)*(s-a)),m=ne(f-d);if(m===vn)return this.double();const g=ne(i*Jn*l),y=ne(o*Jn*u),v=y+g,_=f+d,x=y-g,S=ne(v*m),C=ne(_*x),p=ne(v*x),w=ne(m*_);return new pt(S,C,w,p)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const n=1+256/t,r=[];let i=this,o=i;for(let a=0;a<n;a++){o=i,r.push(o);for(let s=1;s<2**(t-1);s++)o=o.add(i),r.push(o);i=o.double()}return r}wNAF(t,n){!n&&this.equals(pt.BASE)&&(n=sn.BASE);const r=n&&n._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let i=n&&Rb.get(n);i||(i=this.precomputeWindow(r),n&&r!==1&&(i=pt.normalizeZ(i),Rb.set(n,i)));let o=pt.ZERO,a=pt.ZERO;const s=1+256/r,u=2**(r-1),l=BigInt(2**r-1),d=2**r,f=BigInt(r);for(let m=0;m<s;m++){const g=m*u;let y=Number(t&l);if(t>>=f,y>u&&(y-=d,t+=et),y===0){let v=i[g];m%2&&(v=v.negate()),a=a.add(v)}else{let v=i[g+Math.abs(y)-1];y<0&&(v=v.negate()),o=o.add(v)}}return pt.normalizeZ([o,a])[0]}multiply(t,n){return this.wNAF(Fh(t,At.l),n)}multiplyUnsafe(t){let n=Fh(t,At.l,!1);const r=pt.BASE,i=pt.ZERO;if(n===vn)return i;if(this.equals(i)||n===et)return this;if(this.equals(r))return this.wNAF(n);let o=i,a=this;for(;n>vn;)n&et&&(o=o.add(a)),a=a.double(),n>>=et;return o}isSmallOrder(){return this.multiplyUnsafe(At.h).equals(pt.ZERO)}isTorsionFree(){return this.multiplyUnsafe(At.l).equals(pt.ZERO)}toAffine(t=qm(this.z)){const{x:n,y:r,z:i}=this,o=ne(n*t),a=ne(r*t);if(ne(i*t)!==et)throw new Error("invZ was invalid");return new sn(o,a)}fromRistrettoBytes(){kv()}toRistrettoBytes(){kv()}fromRistrettoHash(){kv()}}pt.BASE=new pt(At.Gx,At.Gy,et,ne(At.Gx*At.Gy));pt.ZERO=new pt(vn,et,et,vn);function C8(e){if(!(e instanceof pt))throw new TypeError("ExtendedPoint expected")}function _v(e){if(!(e instanceof li))throw new TypeError("RistrettoPoint expected")}function kv(){throw new Error("Legacy method: switch to RistrettoPoint")}class li{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:n}=At,r=ne(Pu*t*t),i=ne((r+et)*wF);let o=BigInt(-1);const a=ne((o-n*r)*ne(r+n));let{isValid:s,value:u}=bx(i,a),l=ne(u*t);Jo(l)||(l=ne(-l)),s||(u=l),s||(o=r);const d=ne(o*(r-et)*xF-a),f=u*u,m=ne((u+u)*a),g=ne(d*yF),y=ne(et-f),v=ne(et+f);return new pt(ne(m*v),ne(y*g),ne(g*v),ne(m*y))}static hashToCurve(t){t=Cs(t,64);const n=jv(t.slice(0,32)),r=this.calcElligatorRistrettoMap(n),i=jv(t.slice(32,64)),o=this.calcElligatorRistrettoMap(i);return new li(r.add(o))}static fromHex(t){t=Cs(t,32);const{a:n,d:r}=At,i="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",o=jv(t);if(!jF(cd(o),t)||Jo(o))throw new Error(i);const a=ne(o*o),s=ne(et+n*a),u=ne(et-n*a),l=ne(s*s),d=ne(u*u),f=ne(n*r*l-d),{isValid:m,value:g}=_8(ne(f*d)),y=ne(g*u),v=ne(g*y*f);let _=ne((o+o)*y);Jo(_)&&(_=ne(-_));const x=ne(s*v),S=ne(_*x);if(!m||Jo(S)||x===vn)throw new Error(i);return new li(new pt(_,x,et,S))}toRawBytes(){let{x:t,y:n,z:r,t:i}=this.ep;const o=ne(ne(r+n)*ne(r-n)),a=ne(t*n),{value:s}=_8(ne(o*a**Jn)),u=ne(s*o),l=ne(s*a),d=ne(u*l*i);let f;if(Jo(i*d)){let g=ne(n*Pu),y=ne(t*Pu);t=g,n=y,f=ne(u*bF)}else f=l;Jo(t*d)&&(n=ne(-n));let m=ne((r-n)*f);return Jo(m)&&(m=ne(-m)),cd(m)}toHex(){return Wd(this.toRawBytes())}toString(){return this.toHex()}equals(t){_v(t);const n=this.ep,r=t.ep,i=ne(n.x*r.y)===ne(n.y*r.x),o=ne(n.y*r.y)===ne(n.x*r.x);return i||o}add(t){return _v(t),new li(this.ep.add(t.ep))}subtract(t){return _v(t),new li(this.ep.subtract(t.ep))}multiply(t){return new li(this.ep.multiply(t))}multiplyUnsafe(t){return new li(this.ep.multiplyUnsafe(t))}}li.BASE=new li(pt.BASE);li.ZERO=new li(pt.ZERO);const Rb=new WeakMap;class sn{constructor(t,n){this.x=t,this.y=n}_setWindowSize(t){this._WINDOW_SIZE=t,Rb.delete(this)}static fromHex(t,n=!0){const{d:r,P:i}=At;t=Cs(t,32);const o=t.slice();o[31]=t[31]&-129;const a=gc(o);if(n&&a>=i)throw new Error("Expected 0 < hex < P");if(!n&&a>=RE)throw new Error("Expected 0 < hex < 2**256");const s=ne(a*a),u=ne(s-et),l=ne(r*s+et);let{isValid:d,value:f}=bx(u,l);if(!d)throw new Error("Point.fromHex: invalid y coordinate");const m=(f&et)===et;return(t[31]&128)!==0!==m&&(f=ne(-f)),new sn(f,a)}static async fromPrivateKey(t){return(await Gm(t)).point}toRawBytes(){const t=cd(this.y);return t[31]|=this.x&et?128:0,t}toHex(){return Wd(this.toRawBytes())}toX25519(){const{y:t}=this,n=ne((et+t)*qm(et-t));return cd(n)}isTorsionFree(){return pt.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new sn(ne(-this.x),this.y)}add(t){return pt.fromAffine(this).add(pt.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return pt.fromAffine(this).multiply(t,this).toAffine()}}sn.BASE=new sn(At.Gx,At.Gy);sn.ZERO=new sn(vn,et);class yx{constructor(t,n){this.r=t,this.s=n,this.assertValidity()}static fromHex(t){const n=Cs(t,64),r=sn.fromHex(n.slice(0,32),!1),i=gc(n.slice(32,64));return new yx(r,i)}assertValidity(){const{r:t,s:n}=this;if(!(t instanceof sn))throw new Error("Expected Point instance");return Fh(n,At.l,!1),this}toRawBytes(){const t=new Uint8Array(64);return t.set(this.r.toRawBytes()),t.set(cd(this.s),32),t}toHex(){return Wd(this.toRawBytes())}}function SF(...e){if(!e.every(r=>r instanceof Uint8Array))throw new Error("Expected Uint8Array list");if(e.length===1)return e[0];const t=e.reduce((r,i)=>r+i.length,0),n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const o=e[r];n.set(o,i),i+=o.length}return n}const CF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Wd(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=CF[e[n]];return t}function PE(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=n*2,i=e.slice(r,r+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[n]=o}return t}function AE(e){const n=e.toString(16).padStart(64,"0");return PE(n)}function cd(e){return AE(e).reverse()}function Jo(e){return(ne(e)&et)===et}function gc(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");return BigInt("0x"+Wd(Uint8Array.from(e).reverse()))}function jv(e){return ne(gc(e)&Jn**EE-et)}function ne(e,t=At.P){const n=e%t;return n>=vn?n:t+n}function qm(e,t=At.P){if(e===vn||t<=vn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=ne(e,t),r=t,i=vn,o=et;for(;n!==vn;){const s=r/n,u=r%n,l=i-o*s;r=n,n=u,i=o,o=l}if(r!==et)throw new Error("invert: does not exist");return ne(i,t)}function _F(e,t=At.P){const n=new Array(e.length),r=e.reduce((o,a,s)=>a===vn?o:(n[s]=o,ne(o*a,t)),et),i=qm(r,t);return e.reduceRight((o,a,s)=>a===vn?o:(n[s]=ne(o*n[s],t),ne(o*a,t)),i),n}function Gi(e,t){const{P:n}=At;let r=e;for(;t-- >vn;)r*=r,r%=n;return r}function kF(e){const{P:t}=At,n=BigInt(5),r=BigInt(10),i=BigInt(20),o=BigInt(40),a=BigInt(80),u=e*e%t*e%t,l=Gi(u,Jn)*u%t,d=Gi(l,et)*e%t,f=Gi(d,n)*d%t,m=Gi(f,r)*f%t,g=Gi(m,i)*m%t,y=Gi(g,o)*g%t,v=Gi(y,a)*y%t,_=Gi(v,a)*y%t,x=Gi(_,r)*f%t;return{pow_p_5_8:Gi(x,Jn)*e%t,b2:u}}function bx(e,t){const n=ne(t*t*t),r=ne(n*n*t),i=kF(e*r).pow_p_5_8;let o=ne(e*n*i);const a=ne(t*o*o),s=o,u=ne(o*Pu),l=a===e,d=a===ne(-e),f=a===ne(-e*Pu);return l&&(o=s),(d||f)&&(o=u),Jo(o)&&(o=ne(-o)),{isValid:l||d,value:o}}function _8(e){return bx(et,e)}async function k8(...e){const t=await vc.sha512(SF(...e)),n=gc(t);return ne(n,At.l)}function jF(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Cs(e,t){const n=e instanceof Uint8Array?Uint8Array.from(e):PE(e);if(typeof t=="number"&&n.length!==t)throw new Error(`Expected ${t} bytes`);return n}function Fh(e,t,n=!0){if(!t)throw new TypeError("Specify max value");if(typeof e=="number"&&Number.isSafeInteger(e)&&(e=BigInt(e)),typeof e=="bigint"&&e<t){if(n){if(vn<e)return e}else if(vn<=e)return e}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function EF(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}async function Gm(e){if(e=typeof e=="bigint"||typeof e=="number"?AE(Fh(e,RE)):Cs(e),e.length!==32)throw new Error("Expected 32 bytes");const t=await vc.sha512(e),n=EF(t.slice(0,32)),r=t.slice(32,64),i=ne(gc(n),At.l),o=sn.BASE.multiply(i),a=o.toRawBytes();return{head:n,prefix:r,scalar:i,point:o,pointBytes:a}}async function IE(e){return(await Gm(e)).pointBytes}async function RF(e,t){e=Cs(e);const{prefix:n,scalar:r,pointBytes:i}=await Gm(t),o=await k8(n,e),a=sn.BASE.multiply(o),s=await k8(a.toRawBytes(),i,e),u=ne(o+s*r,At.l);return new yx(a,u).toRawBytes()}sn.BASE._setWindowSize(8);const qo={node:jE,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},vc={TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],bytesToHex:Wd,getExtendedPublicKey:Gm,mod:ne,invert:qm,hashToPrivateScalar:e=>{if(e=Cs(e),e.length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");const t=ne(gc(e),At.l);if(t===vn||t===et)throw new Error("Invalid private key");return t},randomBytes:(e=32)=>{if(qo.web)return qo.web.getRandomValues(new Uint8Array(e));if(qo.node){const{randomBytes:t}=qo.node;return new Uint8Array(t(e).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>vc.randomBytes(32),sha512:async e=>{if(qo.web){const t=await qo.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}else{if(qo.node)return Uint8Array.from(qo.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(e=8,t=sn.BASE){const n=t.equals(sn.BASE)?t:new sn(t.x,t.y);return n._setWindowSize(e),n.multiply(Jn),n}};var PF=function(e,t){t||(t={}),typeof t=="function"&&(t={cmp:t});var n=typeof t.cycles=="boolean"?t.cycles:!1,r=t.cmp&&function(o){return function(a){return function(s,u){var l={key:s,value:a[s]},d={key:u,value:a[u]};return o(l,d)}}}(t.cmp),i=[];return function o(a){if(a&&a.toJSON&&typeof a.toJSON=="function"&&(a=a.toJSON()),a!==void 0){if(typeof a=="number")return isFinite(a)?""+a:"null";if(typeof a!="object")return JSON.stringify(a);var s,u;if(Array.isArray(a)){for(u="[",s=0;s<a.length;s++)s&&(u+=","),u+=o(a[s])||"null";return u+"]"}if(a===null)return"null";if(i.indexOf(a)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var l=i.push(a)-1,d=Object.keys(a).sort(r&&r(a));for(u="",s=0;s<d.length;s++){var f=d[s],m=o(a[f]);m&&(u&&(u+=","),u+=JSON.stringify(f)+":"+m)}return i.splice(l,1),"{"+u+"}"}}(e)};const AF=nr(PF);var Al="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Nf=0;Nf<Al.length;Nf++)mu[Al.charCodeAt(Nf)]=Nf;var zh=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Al[t[n]>>2],i+=Al[(t[n]&3)<<4|t[n+1]>>4],i+=Al[(t[n+1]&15)<<2|t[n+2]>>6],i+=Al[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},TE=function(e){var t=e.length*.75,n=e.length,r,i=0,o,a,s,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),d=new Uint8Array(l);for(r=0;r<n;r+=4)o=mu[e.charCodeAt(r)],a=mu[e.charCodeAt(r+1)],s=mu[e.charCodeAt(r+2)],u=mu[e.charCodeAt(r+3)],d[i++]=o<<2|a>>4,d[i++]=(a&15)<<4|s>>2,d[i++]=(s&3)<<6|u&63;return l};/*! noble-hashes - MIT License (c) 2021 Paul Miller (paulmillr.com) */const Ev=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),IF=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!IF)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));(()=>{const e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);try{if(e){const{setImmediate:t}=e("timers");return()=>new Promise(n=>t(n))}}catch{}return()=>new Promise(t=>setTimeout(t,0))})();function TF(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function OE(e){if(typeof e=="string"&&(e=TF(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}class OF{clone(){return this._cloneInto()}}function wx(e){const t=r=>e().update(OE(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t.init=t.create,t}function DF(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),a=Number(n>>i&o),s=Number(n&o),u=r?4:0,l=r?0:4;e.setUint32(t+u,a,r),e.setUint32(t+l,s,r)}class NF extends OF{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ev(this.buffer)}update(t){if(this.destroyed)throw new Error("instance is destroyed");const{view:n,buffer:r,blockLen:i,finished:o}=this;if(o)throw new Error("digest() was already called");t=OE(t);const a=t.length;for(let s=0;s<a;){const u=Math.min(i-this.pos,a-s);if(u===i){const l=Ev(t);for(;i<=a-s;s+=i)this.process(l,s);continue}r.set(t.subarray(s,s+u),this.pos),this.pos+=u,s+=u,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array)||t.length<this.outputLen)throw new Error("_Sha2: Invalid output buffer");if(this.finished)throw new Error("digest() was already called");this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:o}=this;let{pos:a}=this;n[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let u=a;u<i;u++)n[u]=0;DF(r,i-8,BigInt(this.length*8),o),this.process(r,0);const s=Ev(t);this.get().forEach((u,l)=>s.setUint32(4*l,u,o))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:o,destroyed:a,pos:s}=this;return t.length=i,t.pos=s,t.finished=o,t.destroyed=a,i%n&&t.buffer.set(r),t}}const Mf=BigInt(2**32-1),j8=BigInt(32);function MF(e,t=!1){return t?{h:Number(e&Mf),l:Number(e>>j8&Mf)}:{h:Number(e>>j8&Mf)|0,l:Number(e&Mf)|0}}function $F(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=MF(e[i],t);[n[i],r[i]]=[o,a]}return[n,r]}const E8=(e,t,n)=>e>>>n,R8=(e,t,n)=>e<<32-n|t>>>n,tl=(e,t,n)=>e>>>n|t<<32-n,nl=(e,t,n)=>e<<32-n|t>>>n,$f=(e,t,n)=>e<<64-n|t>>>n-32,Lf=(e,t,n)=>e>>>n-32|t<<64-n;function mo(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const LF=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),FF=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,zF=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),BF=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,HF=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),UF=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,[WF,VF]=$F(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Go=new Uint32Array(80),Ko=new Uint32Array(80);class xx extends NF{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:a,Dh:s,Dl:u,Eh:l,El:d,Fh:f,Fl:m,Gh:g,Gl:y,Hh:v,Hl:_}=this;return[t,n,r,i,o,a,s,u,l,d,f,m,g,y,v,_]}set(t,n,r,i,o,a,s,u,l,d,f,m,g,y,v,_){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=s|0,this.Dl=u|0,this.Eh=l|0,this.El=d|0,this.Fh=f|0,this.Fl=m|0,this.Gh=g|0,this.Gl=y|0,this.Hh=v|0,this.Hl=_|0}process(t,n){for(let C=0;C<16;C++,n+=4)Go[C]=t.getUint32(n),Ko[C]=t.getUint32(n+=4);for(let C=16;C<80;C++){const p=Go[C-15]|0,w=Ko[C-15]|0,b=tl(p,w,1)^tl(p,w,8)^E8(p,w,7),k=nl(p,w,1)^nl(p,w,8)^R8(p,w,7),E=Go[C-2]|0,I=Ko[C-2]|0,j=tl(E,I,19)^$f(E,I,61)^E8(E,I,6),P=nl(E,I,19)^Lf(E,I,61)^R8(E,I,6),B=zF(k,P,Ko[C-7],Ko[C-16]),W=BF(B,b,j,Go[C-7],Go[C-16]);Go[C]=W|0,Ko[C]=B|0}let{Ah:r,Al:i,Bh:o,Bl:a,Ch:s,Cl:u,Dh:l,Dl:d,Eh:f,El:m,Fh:g,Fl:y,Gh:v,Gl:_,Hh:x,Hl:S}=this;for(let C=0;C<80;C++){const p=tl(f,m,14)^tl(f,m,18)^$f(f,m,41),w=nl(f,m,14)^nl(f,m,18)^Lf(f,m,41),b=f&g^~f&v,k=m&y^~m&_,E=HF(S,w,k,VF[C],Ko[C]),I=UF(E,x,p,b,WF[C],Go[C]),j=E|0,P=tl(r,i,28)^$f(r,i,34)^$f(r,i,39),B=nl(r,i,28)^Lf(r,i,34)^Lf(r,i,39),W=r&o^r&s^o&s,D=i&a^i&u^a&u;x=v|0,S=_|0,v=g|0,_=y|0,g=f|0,y=m|0,{h:f,l:m}=mo(l|0,d|0,I|0,j|0),l=s|0,d=u|0,s=o|0,u=a|0,o=r|0,a=i|0;const L=LF(j,B,D);r=FF(L,I,P,W),i=L|0}({h:r,l:i}=mo(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:a}=mo(this.Bh|0,this.Bl|0,o|0,a|0),{h:s,l:u}=mo(this.Ch|0,this.Cl|0,s|0,u|0),{h:l,l:d}=mo(this.Dh|0,this.Dl|0,l|0,d|0),{h:f,l:m}=mo(this.Eh|0,this.El|0,f|0,m|0),{h:g,l:y}=mo(this.Fh|0,this.Fl|0,g|0,y|0),{h:v,l:_}=mo(this.Gh|0,this.Gl|0,v|0,_|0),{h:x,l:S}=mo(this.Hh|0,this.Hl|0,x|0,S|0),this.set(r,i,o,a,s,u,l,d,f,m,g,y,v,_,x,S)}roundClean(){Go.fill(0),Ko.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class qF extends xx{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class GF extends xx{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const DE=wx(()=>new xx);wx(()=>new qF);wx(()=>new GF);var ns=function(){return ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ns.apply(this,arguments)},ud=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},dd=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Km=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Au=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};vc.sha512=function(e){return Promise.resolve(DE(e))};function Vd(){return Math.round(new Date().getTime())}var Rv=function(){function e(t,n){n===void 0&&(n={});var r,i,o;this._subject=bn.removeQueryParamsFromURL(t),this._set=(r=n.set)!==null&&r!==void 0?r:new Map,this._push=(i=n.push)!==null&&i!==void 0?i:new Map,this._remove=(o=n.remove)!==null&&o!==void 0?o:new Set,this._destroy=n.destroy,this._previousCommit=n.previousCommit}return Object.defineProperty(e.prototype,"subject",{get:function(){return this._subject},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"set",{get:function(){return this._set},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"push",{get:function(){return this._push},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"remove",{get:function(){return this._remove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"destroy",{get:function(){return this._destroy},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousCommit",{get:function(){return this._previousCommit},enumerable:!1,configurable:!0}),e.prototype.addSetAction=function(t,n){return this.removeRemoveAction(t),this._set.set(t,n),this},e.prototype.addPushAction=function(t){for(var n,r,i,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];var s=(i=this._push.get(t))!==null&&i!==void 0?i:new Set;try{for(var u=Km(o),l=u.next();!l.done;l=u.next()){var d=l.value;s.add(d)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return this._push.set(t,s),this},e.prototype.addRemoveAction=function(t){return this._set.delete(t),this._push.delete(t),this._remove.add(t),this},e.prototype.removeRemoveAction=function(t){return this._remove.delete(t),this},e.prototype.setDestroy=function(t){return this._destroy=t,this},e.prototype.setPreviousCommit=function(t){return this._previousCommit=t,this},e.prototype.setSubject=function(t){return this._subject=t,this},e.prototype.sign=function(t,n){return ud(this,void 0,void 0,function(){var r;return dd(this,function(i){switch(i.label){case 0:return[4,this.signAt(n,t,Vd())];case 1:return r=i.sent(),[2,r]}})})},e.prototype.hasUnsavedChanges=function(){return this.set.size>0||this.push.size>0||this.destroy||this.remove.size>0},e.prototype.clone=function(){var t={set:this.set,push:this.push,remove:this.remove,destroy:this.destroy,previousCommit:this.previousCommit};return new e(this.subject,structuredClone(t))},e.prototype.toPlainObject=function(){return{subject:this.subject,set:Object.fromEntries(this.set.entries()),push:Object.fromEntries(Array.from(this.push.entries()).map(function(t){var n=Ni(t,2),r=n[0],i=n[1];return[r,Array.from(i)]})),remove:Array.from(this.remove),destroy:this.destroy,previousCommit:this.previousCommit}},e.prototype.signAt=function(t,n,r){return ud(this,void 0,void 0,function(){var i,o,a,s;return dd(this,function(u){switch(u.label){case 0:if(t===void 0)throw new Error("No agent passed to sign commit");if(!this.hasUnsavedChanges())throw new Error("No changes to commit in ".concat(this.subject));return i=ns(ns({},this.clone().toPlainObject()),{createdAt:r,signer:t}),o=NE(ns({},i)),[4,ME(o,n)];case 1:return a=u.sent(),s=ns(ns({},i),{signature:a}),[2,s]}})})},e}();function go(e,t,n){t in e&&t!==n&&(Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(e,t)),delete e[t])}function NE(e){return e.remove&&Object.keys(e.remove).length===0&&delete e.remove,e.set&&Object.keys(e.set).length===0&&delete e.set,e.push&&Object.keys(e.push).length===0&&delete e.push,e.destroy===!1&&delete e.destroy,go(e,"createdAt",F.properties.commit.createdAt),go(e,"subject",F.properties.commit.subject),go(e,"set",F.properties.commit.set),go(e,"push",F.properties.commit.push),go(e,"signer",F.properties.commit.signer),go(e,"signature",F.properties.commit.signature),go(e,"remove",F.properties.commit.remove),go(e,"destroy",F.properties.commit.destroy),go(e,"previousCommit",F.properties.commit.previousCommit),e[F.properties.isA]=[F.classes.commit],AF(e)}var ME=function(e,t){return ud(void 0,void 0,void 0,function(){var n,r,i,o,a,s;return dd(this,function(u){switch(u.label){case 0:return n=TE(t),r=new Uint8Array(n),i=new TextEncoder,o=i.encode(e),[4,RF(o,r)];case 1:return a=u.sent(),s=zh(a),[2,s]}})})},KF=function(e){return ud(void 0,void 0,void 0,function(){var t,n,r,i;return dd(this,function(o){switch(o.label){case 0:return t=TE(e),n=new Uint8Array(t),[4,IE(n)];case 1:return r=o.sent(),i=zh(r),[2,i]}})})};function YF(){return ud(this,void 0,void 0,function(){var e,t,n,r;return dd(this,function(i){switch(i.label){case 0:return e=vc.randomPrivateKey(),[4,IE(e)];case 1:return t=i.sent(),n=zh(e),r=zh(t),[2,{publicKey:r,privateKey:n}]}})})}function XF(e){var t={id:e.getSubject(),subject:e.get(F.properties.commit.subject),set:e.get(F.properties.commit.set),push:e.get(F.properties.commit.push),signer:e.get(F.properties.commit.signer),createdAt:e.get(F.properties.commit.createdAt),remove:e.get(F.properties.commit.remove),destroy:e.get(F.properties.commit.destroy),signature:e.get(F.properties.commit.signature)};return t}function $E(e){try{var t=JSON.parse(e);if(typeof t!="object")throw new Error("Commit is not an object");var n=t[F.properties.commit.subject],r=t[F.properties.commit.set],i=t[F.properties.commit.push],o=t[F.properties.commit.signer],a=t[F.properties.commit.createdAt],s=t[F.properties.commit.remove],u=t[F.properties.commit.destroy],l=t[F.properties.commit.signature],d=t["@id"],f=t[F.properties.commit.previousCommit];if(!l)throw new Error("Commit has no signature");return{subject:n,set:r,push:i,signer:o,createdAt:a,remove:s,destroy:u,signature:l,id:d,previousCommit:f}}catch(m){throw new Error("Could not parse commit: ".concat(m,", Commit: ").concat(e))}}function LE(e,t){var n=t.set,r=t.remove,i=t.push;return n&&JF(n,e),r&&ZF(r,e),i&&ez(i,e),e}function QF(e,t){var n=$E(e),r=n.subject,i=n.id,o=n.destroy,a=n.signature,s=t.resources.get(r);if(!s)s=new Fi(r);else if(s.appliedCommitSignatures.has(a))return;if(s=LE(s,n),i&&s.setUnsafe(K.commit.lastCommit,i),o){t.removeResource(r);return}else s.appliedCommitSignatures.add(a),t.addResources(s,{skipCommitCompare:!0})}function JF(e,t,n){var r,i,o=new _s,a=[],s=function(g,y){var v=y;if((y==null?void 0:y.constructor)==={}.constructor){var _=Ni(o.parseValue(y,g),2),x=_[0],S=_[1];v=x,a.push.apply(a,Au([],Ni(S),!1))}Sx(y)&&(v=y.map(function(C){var p=Ni(o.parseValue(C,g),2),w=p[0],b=p[1];return a.push.apply(a,Au([],Ni(b),!1)),w})),t.setUnsafe(g,v)};try{for(var u=Km(Object.entries(e)),l=u.next();!l.done;l=u.next()){var d=Ni(l.value,2),f=d[0],m=d[1];s(f,m)}}catch(g){r={error:g}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}n&&n.addResources(a)}function ZF(e,t){var n,r;try{for(var i=Km(e),o=i.next();!o.done;o=i.next()){var a=o.value;t.removePropValLocally(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function ez(e,t,n){var r,i,o=new _s,a=[],s=function(g,y){var v=t.get(g)||[],_=y,x=_.map(function(C){var p=Ni(o.parseValue(C,g),2),w=p[0],b=p[1];return a.push.apply(a,Au([],Ni(b),!1)),w}),S=Au(Au([],Ni(v),!1),Ni(x),!1);t.setUnsafe(g,S)};try{for(var u=Km(Object.entries(e)),l=u.next();!l.done;l=u.next()){var d=Ni(l.value,2),f=d[0],m=d[1];s(f,m)}}catch(g){r={error:g}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}n&&n.addResources(a)}var tz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mi;(function(e){e.Unauthorized="Unauthorized",e.NotFound="NotFound",e.Server="Server",e.Client="Client"})(Mi||(Mi={}));function FE(e){if(e instanceof Nr){if(e.type===Mi.Unauthorized)return!0;if(e.message.includes("Unauthorized"))return!0}return!1}var Nr=function(e){tz(t,e);function t(n,r){r===void 0&&(r=Mi.Client);var i=e.call(this,n)||this;Object.setPrototypeOf(i,t.prototype),i.type=r,i.message=n;try{var o=JSON.parse(n),a=o[K.description];a&&(i.message=a)}catch{}return i.message||(i.message=i.createMessage()),i}return t.fromResource=function(n){var r=new t(n.get(K.description).toString());return r},t.prototype.createMessage=function(){switch(this.type){case Mi.Unauthorized:return"You don't have the rights to do this.";case Mi.NotFound:return"404 Not found.";case Mi.Server:return"500 Unknown server error.";default:return"Unknown error."}},t}(Error),nz=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},rz=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},iz=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},az=function(e,t){var n,r,i=new URL(e);try{for(var o=iz(Object.entries(t)),a=o.next();!a.done;a=o.next()){var s=oz(a.value,2),u=s[0],l=s[1];i.searchParams.set(u,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i.toString()};function sz(e){if(e.error)throw e.error;return Fi}function lz(e,t,n){return nz(this,void 0,void 0,function(){var r,i;return rz(this,function(o){switch(o.label){case 0:return r=az(e.getServerUrl()+F.endpoints.import,{parent:n.parent,"overwrite-outside":n.overwriteOutside?"true":"false"}),i=sz,[4,e.postToServer(r,t)];case 1:return[2,i.apply(void 0,[o.sent()])]}})})}var Rr,Z;(function(e){e.ATOMIC_URL="https://atomicdata.dev/datatypes/atomicURL",e.BOOLEAN="https://atomicdata.dev/datatypes/boolean",e.DATE="https://atomicdata.dev/datatypes/date",e.FLOAT="https://atomicdata.dev/datatypes/float",e.INTEGER="https://atomicdata.dev/datatypes/integer",e.MARKDOWN="https://atomicdata.dev/datatypes/markdown",e.RESOURCEARRAY="https://atomicdata.dev/datatypes/resourceArray",e.SLUG="https://atomicdata.dev/datatypes/slug",e.STRING="https://atomicdata.dev/datatypes/string",e.TIMESTAMP="https://atomicdata.dev/datatypes/timestamp",e.UNKNOWN="unknown-datatype"})(Z||(Z={}));var zE=function(e){switch(e){case F.datatypes.atomicUrl:return Z.ATOMIC_URL;case F.datatypes.boolean:return Z.BOOLEAN;case F.datatypes.date:return Z.DATE;case F.datatypes.float:return Z.FLOAT;case F.datatypes.integer:return Z.INTEGER;case F.datatypes.markdown:return Z.MARKDOWN;case F.datatypes.resourceArray:return Z.RESOURCEARRAY;case F.datatypes.slug:return Z.SLUG;case F.datatypes.string:return Z.STRING;case F.datatypes.timestamp:return Z.TIMESTAMP;default:return Z.UNKNOWN}},cz=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,uz=/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/,za=function(e,t){var n=null;if(e===void 0)throw new Error("Value is undefined, expected ".concat(t));switch(t){case Z.STRING:{if(!ls(e)){n="Not a string";break}break}case Z.SLUG:{if(!ls(e)){n="Not a slug, not even a string";break}e.match(cz)===null&&(n="Not a valid slug. Only lowercase letters and numbers with dashes `-` between them");break}case Z.ATOMIC_URL:{if(!ls(e)){n="Not a string. Should be a URL";break}bn.tryValidSubject(e);break}case Z.RESOURCEARRAY:{if(!Sx(e)){n="Not an array";break}e.map(function(r,i){try{bn.tryValidSubject(r)}catch{var o=new Error("Invalid URL");throw o.index=i,o}});break}case Z.INTEGER:{if(!Ym(e)){n="Not a number";break}e%1!==0&&(n="Not an integer");break}case Z.DATE:{if(!ls(e)){n="Not a string";break}e.match(uz)===null&&(n="Not a date string: YYYY-MM-DD");break}}if(n!==null)throw new Error(n)};function Sx(e){return Object.prototype.toString.call(e)==="[object Array]"}function ls(e){return typeof e=="string"}function Ym(e){return typeof e=="number"}var BE=(Rr={},Rr[Z.STRING]="String",Rr[Z.SLUG]="Slug",Rr[Z.MARKDOWN]="Markdown",Rr[Z.INTEGER]="Integer",Rr[Z.FLOAT]="Float",Rr[Z.BOOLEAN]="Boolean",Rr[Z.DATE]="Date",Rr[Z.TIMESTAMP]="Timestamp",Rr[Z.ATOMIC_URL]="Resource",Rr[Z.RESOURCEARRAY]="ResourceArray",Rr[Z.UNKNOWN]="Unknown",Rr),Ff=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Pv=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},P8=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_s=function(){function e(){this.parsedResources=[]}return e.prototype.parseObject=function(t,n){this.parsedResources=[];var r=this.parseJsonADResource(t,n);return[r,Pv([],Ff(this.parsedResources),!1)]},e.prototype.parseArray=function(t){this.parsedResources=[];var n=this.parseJsonADArray(t);return[n,Pv([],Ff(this.parsedResources),!1)]},e.prototype.parseValue=function(t,n){this.parsedResources=[];var r=this.parseJsonAdResourceValue(t,n);return[r,Pv([],Ff(this.parsedResources),!1)]},e.prototype.parseJsonADResource=function(t,n){var r,i,o=this;n===void 0&&(n=Nt);var a=new Fi(n);this.parsedResources.push(a);try{var s=function(y,v){if(y==="@id"){if(typeof v!="string")throw new Error("'@id' field must be a string");if(a.getSubject()!=="undefined"&&a.getSubject()!==Nt&&v!==a.getSubject())throw new Error("Resource has wrong subject in @id. Received subject was ".concat(v,", expected ").concat(a.getSubject(),"."));return a.setSubject(v),"continue"}try{if(Sx(v)){var _=v.map(function(p){return o.parseJsonAdResourceValue(p,y)});a.setUnsafe(y,_)}else if(typeof v=="string")a.setUnsafe(y,v);else if(typeof v=="number")a.setUnsafe(y,v);else if(typeof v=="boolean")a.setUnsafe(y,v);else{var x=u.parseJsonAdResourceValue(v,y);a.setUnsafe(y,x)}}catch(p){var S="Failed creating value ".concat(v," for key ").concat(y," in resource ").concat(a.getSubject()),C="".concat(S,". ").concat(p.message);throw new Error(C)}},u=this;try{for(var l=P8(Object.entries(t)),d=l.next();!d.done;d=l.next()){var f=Ff(d.value,2),m=f[0],g=f[1];s(m,g)}}catch(y){r={error:y}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}a.loading=!1,a.hasClasses(F.classes.error)&&(a.error=Nr.fromResource(a))}catch(y){throw y.message="Failed parsing JSON "+y.message,a.setError(y),a.loading=!1,y}return a},e.prototype.parseJsonAdResourceValue=function(t,n){if(typeof t=="string")return t;if((t==null?void 0:t.constructor)==={}.constructor)if(Object.keys(t).includes("@id")){var r=t["@id"];return this.parseJsonADResource(t),r}else return t;throw new Error("Value ".concat(t," in ").concat(n," not a string or a nested Resource"))},e.prototype.parseJsonADArray=function(t){var n,r,i=[];try{try{for(var o=P8(t),a=o.next();!a.done;a=o.next()){var s=a.value,u=this.parseJsonADResource(s);i.push(u)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}catch(l){throw l.message="Failed parsing JSON "+l.message,l}return i},e}(),dz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},fz=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},HE=function(e){var t=new URL(e);return t.pathname="search",t},pz=["+","^","`",":","{","}",'"',"[","]","(",")","!","\\","*"," ","."];function hz(e){return e.replace(new RegExp("([".concat(pz.join("\\"),"])"),"g"),"\\$1")}function mz(e){return Object.entries(e).map(function(t){var n=dz(t,2),r=n[0],i=n[1];return i&&"".concat(hz(r),':"').concat(i,'"')}).join(" AND ")}function gz(e,t,n){n===void 0&&(n={});var r=n.include,i=r===void 0?!1:r,o=n.limit,a=o===void 0?30:o,s=n.parents,u=n.filters,l=HE(e),d=u&&Object.keys(u).length>0&&Object.values(u).filter(function(f){return f&&f.length>0}).length>0;return t&&l.searchParams.set("q",t),i&&l.searchParams.set("include",i.toString()),a&&l.searchParams.set("limit",a.toString()),d&&l.searchParams.set("filters",mz(u)),s&&(Array.isArray(s)?l.searchParams.append("parents",s.join(",")):l.searchParams.append("parents",s)),l.toString()}function UE(e){var t,n,r=HE(e.getServerUrl()).toString(),i=e.clientSideQuery(function(u){return u.getSubject()!==r&&u.getSubject().startsWith(r)});try{for(var o=fz(i),a=o.next();!a.done;a=o.next()){var s=a.value;e.removeResource(s.getSubject())}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}var rl=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},il=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},vz=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ol=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},al=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Nt="unknown-subject",Fi=function(){function e(t,n){if(this.__internalObject=this,this.hasQueue=!1,typeof t!="string")throw new Error("Invalid subject given to resource, must be a string, found "+t);this.new=!!n,this.loading=!1,this.subject=t,this.propvals=new Map,this.appliedCommitSignatures=new Set,this.commitBuilder=new Rv(t)}return Object.defineProperty(e.prototype,"title",{get:function(){var t,n,r;return(r=(n=(t=this.get(K.name))!==null&&t!==void 0?t:this.get(K.shortname))!==null&&n!==void 0?n:this.get(K.file.filename))!==null&&r!==void 0?r:this.subject},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"props",{get:function(){var t,n,r={};try{for(var i=vz(this.propvals.keys()),o=i.next();!o.done;o=i.next()){var a=o.value,s=nF(a);s&&(r[s]=this.get(a))}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},enumerable:!1,configurable:!0}),e.prototype.equals=function(t){return this===t.__internalObject?!0:!(this.getSubject()!==t.getSubject()||this.new!==t.new||this.error!==t.error||this.loading!==t.loading||JSON.stringify(Array.from(this.propvals.entries()))!==JSON.stringify(Array.from(t.propvals.entries()))||JSON.stringify(Array.from(this.commitBuilder.set.entries()))!==JSON.stringify(Array.from(t.commitBuilder.set.entries())))},e.prototype.canWrite=function(t,n,r){return rl(this,void 0,void 0,function(){var i,o,a;return il(this,function(s){switch(s.label){case 0:return i=this.get(K.write),n?i&&Iu(i).includes(n)?[2,[!0,void 0]]:i&&Iu(i).includes(YE.publicAgent)?[2,[!0,void 0]]:(o=this.get(K.parent),o?o===n?[2,[!0,void 0]]:r===o?(console.warn("Circular parent",r),[2,[!0,"Circular parent in ".concat(this.getSubject())]]):[4,t.getResourceAsync(o)]:[2,[!1,"No write right or parent in ".concat(this.getSubject())]]):[2,[!1,"No agent given"]];case 1:return a=s.sent(),[4,a.canWrite(t,n,this.getSubject())];case 2:return[2,s.sent()]}})})},e.prototype.clone=function(){var t=new e(this.subject);return t.propvals=structuredClone(this.propvals),t.loading=this.loading,t.new=this.new,t.error=structuredClone(this.error),t.commitError=this.commitError,t.commitBuilder=this.commitBuilder.clone(),t.appliedCommitSignatures=this.appliedCommitSignatures,t},e.prototype.isReady=function(){return!this.loading&&this.error===void 0},e.prototype.get=function(t){return this.propvals.get(t)},e.prototype.getSubjects=function(t){return this.getArray(t).map(function(n){return typeof n=="string"?n:n["@id"]})},e.prototype.getArray=function(t){var n,r=(n=this.propvals.get(t))!==null&&n!==void 0?n:[];return Iu(r)},e.prototype.getClasses=function(){return this.getSubjects(K.isA)},e.prototype.hasClasses=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.every(function(i){return t.getClasses().includes(i)})},e.prototype.removeClasses=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return this.set(K.isA,this.getClasses().filter(function(i){return!n.includes(i)}),t)},e.prototype.addClasses=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=new Set(al(al([],ol(this.getClasses()),!1),ol(n),!1));return this.set(K.isA,Array.from(i),t)},e.prototype.hasUnsavedChanges=function(){return this.commitBuilder.hasUnsavedChanges()},e.prototype.getCommitsCollection=function(){var t=new URL(this.subject);return t.pathname="/commits",t.searchParams.append("property",F.properties.commit.subject),t.searchParams.append("value",this.subject),t.searchParams.append("sort_by",F.properties.commit.createdAt),t.searchParams.append("include_nested","true"),t.searchParams.append("page_size","9999"),t.toString()},e.prototype.getChildrenCollection=function(){var t=new URL(this.subject);return t.pathname="/query",t.searchParams.set("property",K.parent),t.searchParams.set("value",this.subject),t.toString()},e.prototype.getHistory=function(t,n){return rl(this,void 0,void 0,function(){var r,i,o,a,s,u,l,d;return il(this,function(f){switch(f.label){case 0:return[4,t.fetchResourceFromServer(this.getCommitsCollection())];case 1:r=f.sent(),i=r.get(K.collection.members),o=[],a=new e(this.subject),s=0,f.label=2;case 2:return s<i.length?[4,t.getResourceAsync(i[s])]:[3,6];case 3:return u=f.sent(),l=XF(u),d=LE(a.clone(),l),o.push({commit:l,resource:d}),a=d,n&&s%30===0?(n(Math.round(s/i.length*100)),[4,yz()]):[3,5];case 4:f.sent(),f.label=5;case 5:return s++,[3,2];case 6:return[2,o]}})})},e.prototype.getSubject=function(){return this.subject},e.prototype.getSubjectNoParams=function(){var t=new URL(this.subject);return t.origin+t.pathname},e.prototype.getPropVals=function(){return this.propvals},e.prototype.getRights=function(t){return rl(this,void 0,void 0,function(){var n,r,i,o,a,s,u=this;return il(this,function(l){switch(l.label){case 0:return n=[],r=this.getSubjects(K.write),r.forEach(function(d){n.push({for:d,type:Bh.WRITE,setIn:u.subject})}),i=this.getSubjects(K.read),i.forEach(function(d){n.push({for:d,type:Bh.READ,setIn:u.subject})}),o=this.get(K.parent),o?o===this.getSubject()?(console.warn("Circular parent",o),[2,n]):[4,t.getResourceAsync(o)]:[3,3];case 1:return a=l.sent(),[4,a.getRights(t)];case 2:s=l.sent(),n.push.apply(n,al([],ol(s),!1)),l.label=3;case 3:return[2,n]}})})},e.prototype.isUnauthorized=function(){return!!this.error&&FE(this.error)},e.prototype.destroy=function(t,n){return rl(this,void 0,void 0,function(){var r,i,o;return il(this,function(a){switch(a.label){case 0:if(this.new)return t.removeResource(this.getSubject()),[2];if(r=new Rv(this.getSubject()),r.setDestroy(!0),n===void 0&&(n=t.getAgent()),(n==null?void 0:n.subject)===void 0)throw new Error("No agent has been set or passed, you cannot delete this.");return[4,r.sign(n.privateKey,n.subject)];case 1:return i=a.sent(),o=new URL(this.getSubject()).origin+"/commit",[4,t.postCommit(i,o)];case 2:return a.sent(),t.removeResource(this.getSubject()),[2]}})})},e.prototype.pushPropVal=function(t,n,r){var i,o=this,a,s=(a=this.get(t))!==null&&a!==void 0?a:[];r&&(n=n.filter(function(u){return!s.includes(u)}).filter(function(u){var l;return!(!((l=o.commitBuilder.push[t])===null||l===void 0)&&l.includes(u))}).filter(function(u,l,d){return d.indexOf(u)===l})),(i=this.commitBuilder).addPushAction.apply(i,al([t],ol(n),!1)),this.propvals.set(t,al(al([],ol(s),!1),ol(n),!1))},e.prototype.removePropVal=function(t){this.propvals.delete(t),this.commitBuilder.addRemoveAction(t)},e.prototype.removePropValLocally=function(t){this.propvals.delete(t)},e.prototype.save=function(t,n){var r,i,o;return rl(this,void 0,void 0,function(){var a,s,u,l,d,f,m,g,y,v,_;return il(this,function(x){switch(x.label){case 0:if(!this.commitBuilder.hasUnsavedChanges())return console.warn("No changes to ".concat(this.subject,", not saving")),[2,void 0];if(a=(r=t.getAgent())!==null&&r!==void 0?r:n,!a)throw new Error("No agent has been set or passed, you cannot save.");return this.hasQueue?[2]:this.isParentNew(t)?(t.batchResource(this.getSubject()),[2]):this.inProgressCommit?(this.hasQueue=!0,[4,this.inProgressCommit]):[3,2];case 1:return x.sent(),this.hasQueue=!1,this.inProgressCommit=void 0,[2,this.save(t,n)];case 2:return s=(i=this.get(K.commit.lastCommit))===null||i===void 0?void 0:i.toString(),s&&this.commitBuilder.setPreviousCommit(s),u=this.new,l=function(){},this.inProgressCommit=new Promise(function(S){l=function(){S()}}),d=this.commitBuilder.clone(),this.commitBuilder=new Rv(this.getSubject()),[4,d.sign(a.privateKey,a.subject)];case 3:f=x.sent(),this.appliedCommitSignatures.add(f.signature),this.loading=!1,this.new=!1,m=new URL(this.getSubject()).origin+"/commit",x.label=4;case 4:return x.trys.push([4,8,,12]),this.commitError=void 0,t.addResources(this,{skipCommitCompare:!0}),[4,t.postCommit(f,m)];case 5:return g=x.sent(),this.setUnsafe(K.commit.lastCommit,g.id),t.notifyResourceSaved(this),u?(t.subscribeWebSocket(this.subject),[4,t.saveBatchForParent(this.getSubject())]):[3,7];case 6:x.sent(),x.label=7;case 7:return l(),[2,g.id];case 8:return y=x.sent(),y.message.includes("previousCommit")?(console.warn("previousCommit missing or mismatch, retrying..."),[4,t.fetchResourceFromServer(this.getSubject())]):[3,11];case 9:return v=x.sent(),_=(o=v.get(K.commit.lastCommit))===null||o===void 0?void 0:o.toString(),_&&this.setUnsafe(K.commit.lastCommit,_),l(),[4,this.save(t,a)];case 10:return[2,x.sent()];case 11:throw this.commitBuilder=d,this.commitError=y,t.addResources(this,{skipCommitCompare:!0}),l(),y;case 12:return[2]}})})},e.prototype.set=function(t,n,r,i){return i===void 0&&(i=!0),rl(this,void 0,void 0,function(){var o;return il(this,function(a){switch(a.label){case 0:return r.isOffline()&&(console.warn("Offline, not validating"),i=!1),i?[4,r.getProperty(t)]:[3,2];case 1:o=a.sent(),za(n,o.datatype),a.label=2;case 2:return n===void 0?(this.removePropVal(t),[2]):(this.propvals.set(t,n),this.commitBuilder.addSetAction(t,n),[2])}})})},e.prototype.setUnsafe=function(t,n){this.propvals.set(t,n)},e.prototype.setError=function(t){this.error=t},e.prototype.setSubject=function(t){bn.tryValidSubject(t),this.commitBuilder.setSubject(t),this.subject=t},e.prototype.equalsCurrentValue=function(t,n){var r=this.get(t);return n===Object(n)?JSON.stringify(r)===JSON.stringify(n):r===n},e.prototype.isParentNew=function(t){var n=this.propvals.get(ve.properties.parent);if(!n)return!1;var r=t.getResourceLoading(n);return r.new},e}(),Bh;(function(e){e.READ="read",e.WRITE="write"})(Bh||(Bh={}));function Hh(e){return e.__internalObject!==e&&console.warn("Attempted to proxy a proxy for "+e.getSubject()),new Proxy(e.__internalObject,{})}var yz=function(){return new Promise(function(e){return setTimeout(e)})},A8=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},I8=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},T8=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},O8=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},bz=function(){function e(){this.subscriptions=new Map}return e.prototype.register=function(t,n){var r,i=(r=this.subscriptions.get(t))!==null&&r!==void 0?r:new Set;return i.add(n),this.subscriptions.set(t,i),function(){i.delete(n)}},e.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return A8(this,void 0,void 0,function(){var i,o,a=this;return I8(this,function(s){switch(s.label){case 0:return this.subscriptions.has(t)?(i=this.subscriptions.get(t),o=function(u){return A8(a,void 0,void 0,function(){return I8(this,function(l){return[2,u.apply(void 0,O8([],T8(n),!1))]})})},i?[4,Promise.allSettled(O8([],T8(i),!1).map(function(u){return o(u)}))]:[2]):[2];case 1:return s.sent(),[2]}})})},e.prototype.hasSubscriptions=function(t){return this.subscriptions.has(t)},e}(),WE=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},VE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},wz=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function D8(e,t){var n=new URL(e);n.protocol==="http:"?n.protocol="ws":n.protocol="wss",n.pathname="/ws";var r=new WebSocket(n.toString());return r.onopen=function(i){return Sz(t,r)},r.onmessage=function(i){return Cz(i,t)},r.onerror=_z,r}function Sz(e,t){Pb(t,e).then(function(){var n,r;try{for(var i=wz(e.subscribers.keys()),o=i.next();!o.done;o=i.next()){var a=o.value;e.subscribeWebSocket(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}})}function Cz(e,t){if(e.data.startsWith("COMMIT ")){var n=e.data.slice(7);QF(n,t)}else if(e.data.startsWith("ERROR "))t.notifyError(e.data.slice(6));else if(e.data.startsWith("RESOURCE ")){var r=qE(e);t.addResources(r)}else console.warn("Unknown websocket message:",e)}function _z(e){console.error("websocket error:",e)}function qE(e){var t=e.data.slice(9),n=JSON.parse(t),r=new _s,i=xz(r.parseObject(n),2);i[0];var o=i[1];return o}function Pb(e,t,n){var r;return n===void 0&&(n=!1),WE(this,void 0,void 0,function(){var i,o,a=this;return VE(this,function(s){switch(s.label){case 0:return i=t.getAgent(),!i||!i.subject?[2]:!e.url.startsWith("ws://localhost")&&(!((r=i==null?void 0:i.subject)===null||r===void 0)&&r.startsWith("http://localhost"))?(console.warn("Can't authenticate localhost Agent over websocket with remote server ".concat(e.url," because the server will nog be able to retrieve your Agent and verify your public key.")),[2]):[4,vx(e.url,i)];case 1:return o=s.sent(),e.send("AUTHENTICATE "+JSON.stringify(o)),n&&this.resources.forEach(function(u){(u.isUnauthorized()||u.loading)&&a.fetchResourceFromServer(u.getSubject())}),[2]}})})}var N8=5e3;function kz(e,t){return WE(this,void 0,void 0,function(){return VE(this,function(n){return[2,new Promise(function(r,i){e.addEventListener("message",function o(a){var s=setTimeout(function(){e.removeEventListener("message",o),i(new Error('Request for subject "'.concat(t,'" timed out after ').concat(N8,"ms.")))},N8);a.data.startsWith("RESOURCE ")&&qE(a).forEach(function(u){u.getSubject()===t&&(clearTimeout(s),e.removeEventListener("message",o),r(u))})}),e.send("GET "+t)})]})})}var dn=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},fn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Av=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Iv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jz=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$r;(function(e){e.ResourceSaved="resource-saved",e.ResourceRemoved="resource-removed",e.ResourceManuallyCreated="resource-manually-created",e.AgentChanged="agent-changed",e.Error="error"})($r||($r={}));var Tv=function(){return typeof WebSocket<"u"},GE=function(){function e(t){t===void 0&&(t={}),this.batchedResources=new Map,this.eventManager=new bz,this._resources=new Map,this.webSockets=new Map,this.subscribers=new Map,t.serverUrl&&this.setServerUrl(t.serverUrl),t.agent&&this.setAgent(t.agent),this.client=new bn(this.injectedFetch),this.getAgent=this.getAgent.bind(this),this.setAgent=this.setAgent.bind(this)}return Object.defineProperty(e.prototype,"resources",{get:function(){return this._resources},enumerable:!1,configurable:!0}),e.prototype.injectFetch=function(t){this.injectedFetch=t,this.client.setFetch(t)},e.prototype.addResources=function(t,n){var r,i;try{for(var o=Av(Array.isArray(t)?t:[t]),a=o.next();!a.done;a=o.next()){var s=a.value;this.addResource(s,n??{})}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addResource=function(t,n){var r=n.skipCommitCompare;if(t.get(F.properties.incomplete)){var i=this.resources.get(t.getSubject());if(i&&!i.loading)return}if(!r){var o=this.resources.get(t.getSubject());if(o&&!o.hasClasses(eo.classes.collection)&&!o.loading&&!o.new&&o.get(_b.properties.lastCommit)===t.get(_b.properties.lastCommit))return}this.resources.set(t.getSubject(),t.__internalObject),this.notify(t.__internalObject)},e.prototype.newResource=function(t){return t===void 0&&(t={}),dn(this,void 0,void 0,function(){var n,r,i,o,a,s,u,l,d,f,m,g,y,v,_;return fn(this,function(x){switch(x.label){case 0:return n=t.subject,r=t.parent,i=t.isA,o=t.propVals,a=Array.isArray(i)?i:[i],s=n??this.createSubject(a[0],r),u=this.getResourceLoading(s,{newResource:!0}),a[0]?[4,u.addClasses.apply(u,jz([this],Iv(a),!1))]:[3,2];case 1:x.sent(),x.label=2;case 2:return[4,u.set(ve.properties.parent,r??this.serverUrl,this)];case 3:if(x.sent(),!o)return[3,11];x.label=4;case 4:x.trys.push([4,9,10,11]),l=Av(Object.entries(o)),d=l.next(),x.label=5;case 5:return d.done?[3,8]:(f=Iv(d.value,2),m=f[0],g=f[1],[4,u.set(m,g,this)]);case 6:x.sent(),x.label=7;case 7:return d=l.next(),[3,5];case 8:return[3,11];case 9:return y=x.sent(),v={error:y},[3,11];case 10:try{d&&!d.done&&(_=l.return)&&_.call(l)}finally{if(v)throw v.error}return[7];case 11:return[2,u]}})})},e.prototype.checkSubjectTaken=function(t){var n;return dn(this,void 0,void 0,function(){var r,i,o;return fn(this,function(a){switch(a.label){case 0:if(r=this.resources.get(t),r!=null&&r.isReady()&&!(r!=null&&r.new))return[2,!0];a.label=1;case 1:return a.trys.push([1,3,,4]),i=this.agent?{agent:this.agent,serverURL:this.getServerUrl()}:void 0,[4,this.client.fetchResourceHTTP(t,{method:"GET",signInfo:i})];case 2:return o=a.sent().createdResources,!((n=o.find(function(s){return s.getSubject()===t}))===null||n===void 0)&&n.isReady()?[2,!0]:[3,4];case 3:return a.sent(),[3,4];case 4:return[2,!1]}})})},e.prototype.buildUniqueSubjectFromParts=function(t,n){return dn(this,void 0,void 0,function(){var r,i;return fn(this,function(o){return r=t.join("/"),i=n??this.getServerUrl(),[2,this.findAvailableSubject(r,i)]})})},e.prototype.createSubject=function(t,n){var r=this.randomPart();return t=t||"things",n?"".concat(n,"/").concat(t,"/").concat(r):"".concat(this.getServerUrl(),"/").concat(t,"/").concat(r)},e.prototype.fetchResourceFromServer=function(t,n){return n===void 0&&(n={}),dn(this,void 0,void 0,function(){var r,i,o,a;return fn(this,function(s){switch(s.label){case 0:return n.setLoading&&(r=new Fi(t),r.loading=!0,this.addResources(r)),i=this.getWebSocketForSubject(t),!n.fromProxy&&!n.noWebSocket&&Tv()&&(i==null?void 0:i.readyState)===WebSocket.OPEN?[4,kz(i,t)]:[3,2];case 1:return s.sent(),[3,4];case 2:return o=this.agent?{agent:this.agent,serverURL:this.getServerUrl()}:void 0,[4,this.client.fetchResourceHTTP(t,{from:n.fromProxy?this.getServerUrl():void 0,method:n.method,body:n.body,signInfo:o})];case 3:a=s.sent().createdResources,this.addResources(a),s.label=4;case 4:return[2,this.resources.get(t)]}})})},e.prototype.getAllSubjects=function(){return Array.from(this.resources.keys())},e.prototype.getDefaultWebSocket=function(){return this.webSockets.get(this.getServerUrl())},e.prototype.getWebSocketForSubject=function(t){var n=new URL(t),r=this.webSockets.get(n.origin);if(r)return r;typeof window<"u"&&this.webSockets.set(n.origin,D8(n.origin,this))},e.prototype.getServerUrl=function(){return this.serverUrl},e.prototype.getAgent=function(){var t;return(t=this.agent)!==null&&t!==void 0?t:void 0},e.prototype.getResourceLoading=function(t,n){if(t===void 0&&(t=Nt),n===void 0&&(n={}),t===Nt||t===null){var r=new Fi(Nt,n.newResource);return r}var i=this.resources.get(t);if(i)!n.allowIncomplete&&i.loading===!1&&i.get(F.properties.incomplete)&&(i.loading=!0,this.addResources(i),this.fetchResourceFromServer(t,n));else return i=new Fi(t,n.newResource),i.loading=!0,this.addResources(i),n.newResource||this.fetchResourceFromServer(t,n),i;return i},e.prototype.getResourceAsync=function(t){return dn(this,void 0,void 0,function(){var n,r=this;return fn(this,function(i){return n=this.resources.get(t),n&&n.isReady()?[2,n]:n&&!n.isReady()?[2,new Promise(function(o,a){var s=5e3,u=function(l){r.unsubscribe(t,u),o(l)};r.subscribe(t,u),setTimeout(function(){r.unsubscribe(t,u),a(new Error('Async Request for subject "'.concat(t,'" timed out after ').concat(s,"ms.")))},s)})]:[2,this.fetchResourceFromServer(t)]})})},e.prototype.getProperty=function(t){var n;return dn(this,void 0,void 0,function(){var r,i,o,a,s,u;return fn(this,function(l){switch(l.label){case 0:return[4,this.getResourceAsync(t)];case 1:if(r=l.sent(),r===void 0)throw Error("Property ".concat(t," is not found"));if(r.error)throw Error("Property ".concat(t," cannot be loaded: ").concat(r.error));if(i=r.get(F.properties.datatype),i===void 0)throw Error("Property ".concat(t," has no datatype: ").concat(r.getPropVals()));if(o=r.get(F.properties.shortname),o===void 0)throw Error("Property ".concat(t," has no shortname: ").concat(r.getPropVals()));if(a=r.get(F.properties.description),a===void 0)throw Error("Property ".concat(t," has no description: ").concat(r.getPropVals()));return s=(n=r.get(F.properties.classType))===null||n===void 0?void 0:n.toString(),u={subject:t,classType:s,shortname:o.toString(),description:a.toString(),datatype:zE(i.toString())},[2,u]}})})},e.prototype.notifyError=function(t){var n=t instanceof Error?t:new Error(t);if(this.eventManager.hasSubscriptions($r.Error))this.eventManager.emit($r.Error,n);else throw n},e.prototype.isOffline=function(){var t;return Bp()?!(!((t=window==null?void 0:window.navigator)===null||t===void 0)&&t.onLine):!1},e.prototype.notifyResourceSaved=function(t){return dn(this,void 0,void 0,function(){return fn(this,function(n){switch(n.label){case 0:return[4,this.eventManager.emit($r.ResourceSaved,t)];case 1:return n.sent(),[2]}})})},e.prototype.notifyResourceManuallyCreated=function(t){return dn(this,void 0,void 0,function(){return fn(this,function(n){switch(n.label){case 0:return[4,this.eventManager.emit($r.ResourceManuallyCreated,t)];case 1:return n.sent(),[2]}})})},e.prototype.parseMetaTags=function(){var t=this,n=document.querySelectorAll('meta[property="json-ad-initial"]'),r=new _s;n.forEach(function(i){var o=i.getAttribute("content");if(o!==null){var a=JSON.parse(atob(o)),s=Iv(r.parseObject(a),2);s[0];var u=s[1];t.addResources(u)}})},e.prototype.preloadPropsAndClasses=function(){return dn(this,void 0,void 0,function(){var t,n;return fn(this,function(r){switch(r.label){case 0:return t=new URL("/classes",this.serverUrl),n=new URL("/properties",this.serverUrl),t.searchParams.set("include_external","true"),n.searchParams.set("include_external","true"),t.searchParams.set("include_nested","true"),n.searchParams.set("include_nested","true"),t.searchParams.set("page_size","999"),n.searchParams.set("page_size","999"),[4,Promise.all([this.fetchResourceFromServer(t.toString()),this.fetchResourceFromServer(n.toString())])];case 1:return r.sent(),[2]}})})},e.prototype.postToServer=function(t,n){return dn(this,void 0,void 0,function(){return fn(this,function(r){return[2,this.fetchResourceFromServer(t,{body:n,noWebSocket:!0,method:"POST"})]})})},e.prototype.removeResource=function(t){var n=this.resources.get(t);n&&(this.resources.delete(t),this.eventManager.emit($r.ResourceRemoved,n))},e.prototype.renameSubject=function(t,n){var r;return dn(this,void 0,void 0,function(){var i,o;return fn(this,function(a){switch(a.label){case 0:return bn.tryValidSubject(n),i=t.getSubject(),[4,this.checkSubjectTaken(n)];case 1:if(a.sent())throw Error("New subject name is already taken: ".concat(n));return t.setSubject(n),o=(r=this.subscribers.get(i))!==null&&r!==void 0?r:[],this.subscribers.set(n,o),this.removeResource(i),this.addResources(t),[2]}})})},e.prototype.setAgent=function(t){var n=this;this.agent=t,t&&t.subject?(Bp()&&kE(this.serverUrl,t),this.webSockets.forEach(function(r){r.readyState===r.OPEN?Pb(r,n,!0):r.onopen=function(){Pb(r,n,!0)}})):Bp()&&lF(),this.eventManager.emit($r.AgentChanged,t)},e.prototype.setServerUrl=function(t){if(bn.tryValidSubject(t),t.substring(-1)==="/")throw Error("baseUrl should not have a trailing slash");this.serverUrl=t,Tv()&&this.openWebSocket(t)},e.prototype.openWebSocket=function(t){if(Tv()){if(this.webSockets.has(t))return;this.webSockets.set(t,D8(t,this))}else console.warn("WebSockets not supported, no window available")},e.prototype.subscribe=function(t,n){var r=this;if(t===void 0)throw Error("Cannot subscribe to undefined subject");var i=this.subscribers.get(t);return i===void 0&&(this.subscribeWebSocket(t),i=[]),i.push(n),this.subscribers.set(t,i),function(){r.unsubscribe(t,n)}},e.prototype.subscribeWebSocket=function(t){if(t!==Nt)try{var n=this.getWebSocketForSubject(t);(n==null?void 0:n.readyState)===1&&(n==null||n.send("SUBSCRIBE ".concat(t)))}catch(r){console.error(r)}},e.prototype.unSubscribeWebSocket=function(t){var n;if(t!==Nt)try{(n=this.getDefaultWebSocket())===null||n===void 0||n.send("UNSUBSCRIBE ".concat(t))}catch(r){console.error(r)}},e.prototype.unsubscribe=function(t,n){if(t!==void 0){var r=this.subscribers.get(t);r&&(r=r==null?void 0:r.filter(function(i){return i!==n}),this.subscribers.set(t,r))}},e.prototype.on=function(t,n){return this.eventManager.register(t,n)},e.prototype.uploadFiles=function(t,n){return dn(this,void 0,void 0,function(){var r,i;return fn(this,function(o){switch(o.label){case 0:if(r=this.getAgent(),!r)throw Error("No agent set, cannot upload files");return[4,this.client.uploadFiles(t,this.getServerUrl(),r,n)];case 1:return i=o.sent(),this.addResources(i),[2,i.map(function(a){return a.getSubject()})]}})})},e.prototype.postCommit=function(t,n){return dn(this,void 0,void 0,function(){return fn(this,function(r){return[2,this.client.postCommit(t,n)]})})},e.prototype.getResourceAncestry=function(t){return dn(this,void 0,void 0,function(){var n,r,i;return fn(this,function(o){switch(o.label){case 0:n=[t.getSubject()],r=t.get(F.properties.parent),r&&n.push(r),o.label=1;case 1:return r?[4,this.getResourceAsync(r)]:[3,3];case 2:if(i=o.sent(),i){if(r=i.get(F.properties.parent),n.includes(r))throw new Error("Resource ".concat(t.getSubject()," ancestry is cyclical. ").concat(r," is already in the ancestry}"));n.push(r)}return[3,1];case 3:return[2,n]}})})},e.prototype.clientSideQuery=function(t){return Array.from(this.resources.values()).filter(t)},e.prototype.batchResource=function(t){var n=this._resources.get(t);if(!n)throw new Error("Resource ".concat(t," can not be saved because it is not in the store."));var r=n.get(ve.properties.parent);if(r===void 0)throw new Error("Resource ".concat(t," can not be added to a batch because it's missing a parent."));this.batchedResources.has(r)?this.batchedResources.get(r).add(t):this.batchedResources.set(r,new Set([t]))},e.prototype.saveBatchForParent=function(t){return dn(this,void 0,void 0,function(){var n,r,i,o,a,s,u,l;return fn(this,function(d){switch(d.label){case 0:if(n=this.batchedResources.get(t),!n)return[2];d.label=1;case 1:d.trys.push([1,6,7,8]),r=Av(n),i=r.next(),d.label=2;case 2:return i.done?[3,5]:(o=i.value,a=this._resources.get(o),[4,a==null?void 0:a.save(this)]);case 3:d.sent(),d.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return s=d.sent(),u={error:s},[3,8];case 7:try{i&&!i.done&&(l=r.return)&&l.call(r)}finally{if(u)throw u.error}return[7];case 8:return this.batchedResources.delete(t),[2]}})})},e.prototype.randomPart=function(){return Math.random().toString(36).substring(2)},e.prototype.findAvailableSubject=function(t,n,r){return r===void 0&&(r=!0),dn(this,void 0,void 0,function(){var i,o,a;return fn(this,function(s){switch(s.label){case 0:return i="".concat(n,"/").concat(t),r||(o=this.randomPart(),i+="-".concat(o)),[4,this.checkSubjectTaken(i)];case 1:return a=s.sent(),a?[2,this.findAvailableSubject(t,n,!1)]:[2,i]}})})},e.prototype.notify=function(t){return dn(this,void 0,void 0,function(){var n,r,i=this;return fn(this,function(o){return n=t.getSubject(),r=this.subscribers.get(n),r===void 0?[2]:(Promise.allSettled(r.map(function(a){return dn(i,void 0,void 0,function(){return fn(this,function(s){return[2,a(t)]})})})),[2])})})},e}(),Ez=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Iu(e){if(e===void 0)throw new Error("Not an array: ".concat(e,", is ").concat(typeof e));if(e.constructor===Array)return e;throw new Error("Not an array: ".concat(e,", is a ").concat(typeof e))}function Rz(e){if(typeof e!="boolean")throw new Error("Not a boolean: ".concat(e,", is a ").concat(typeof e));return e}function KE(e){if(typeof e=="number"){var t=new Date(0);return t.setUTCMilliseconds(e),t}if(typeof e=="string")return new Date(e.toString());throw new Error("Cannot be converted into Date: ".concat(e,", is a ").concat(typeof e))}function Pz(e){if(typeof e!="number")throw new Error("Not a number: ".concat(e,", is a ").concat(typeof e));return e}function Ab(e){var t;return(t=e==null?void 0:e.toString())!==null&&t!==void 0?t:"undefined"}function Az(e){if(typeof e=="string")return e;if(e instanceof Date)throw new Error("Not a resource: ".concat(e,", is a Date"));if((e==null?void 0:e.constructor)===Array)throw new Error("Not a resource: ".concat(e,", is an Array"));if(typeof e=="object"){var t=new _s,n=Ez(t.parseObject(e,"nested-resource"),1),r=n[0];return r}throw typeof e!="object"?new Error("Not a resource: ".concat(e,", is a ").concat(typeof e)):new Error("Not a resource: ".concat(e,", is a ").concat(typeof e))}var ft={agent:"https://atomicdata.dev/classes/Agent",chatRoom:"https://atomicdata.dev/classes/ChatRoom",collection:"https://atomicdata.dev/classes/Collection",commit:"https://atomicdata.dev/classes/Commit",class:"https://atomicdata.dev/classes/Class",document:"https://atomicdata.dev/classes/Document",bookmark:"https://atomicdata.dev/class/Bookmark",elements:{paragraph:"https://atomicdata.dev/classes/elements/Paragraph"},error:"https://atomicdata.dev/classes/Error",property:"https://atomicdata.dev/classes/Property",datatype:"https://atomicdata.dev/classes/Datatype",endpoint:"https://atomicdata.dev/classes/Endpoint",drive:"https://atomicdata.dev/classes/Drive",redirect:"https://atomicdata.dev/classes/Redirect",invite:"https://atomicdata.dev/classes/Invite",file:"https://atomicdata.dev/classes/File",message:"https://atomicdata.dev/classes/Message",importer:"https://atomicdata.dev/classes/Importer",folder:"https://atomicdata.dev/classes/Folder",article:"https://atomicdata.dev/classes/Article",displayStyle:"https://atomicdata.dev/class/DisplayStyle",displayStyles:{grid:"https://atomicdata.dev/display-style/grid",list:"https://atomicdata.dev/display-style/list"},dateFormat:"https://atomicdata.dev/classes/DateFormat",numberFormat:"https://atomicdata.dev/classes/NumberFormat",constraintProperties:{rangeProperty:"https://atomicdata.dev/classes/RangeProperty",floatRangeProperty:"https://atomicdata.dev/classes/FloatRangeProperty",formattedNumber:"https://atomicdata.dev/classes/FormattedNumber",selectProperty:"https://atomicdata.dev/classes/SelectProperty",formattedDate:"https://atomicdata.dev/classes/FormattedDate"},table:"https://atomicdata.dev/classes/Table",tag:"https://atomicdata.dev/classes/Tag",ontology:"https://atomicdata.dev/class/ontology"},K={allowsOnly:"https://atomicdata.dev/properties/allowsOnly",getAll:"https://atomicdata.dev/properties/?page_size=999",children:"https://atomicdata.dev/properties/children",classType:"https://atomicdata.dev/properties/classtype",createdBy:"https://atomicdata.dev/properties/createdBy",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",drives:"https://atomicdata.dev/properties/drives",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",paymentPointer:"https://atomicdata.dev/properties/paymentPointer",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",subResources:"https://atomicdata.dev/properties/subresources",write:"https://atomicdata.dev/properties/write",displayStyle:"https://atomicdata.dev/property/display-style",publishedAt:"https://atomicdata.dev/properties/published-at",agent:{publicKey:"https://atomicdata.dev/properties/publicKey"},collection:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value"},commit:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"},document:{elements:"https://atomicdata.dev/properties/documents/elements"},endpoint:{parameters:"https://atomicdata.dev/properties/endpoint/parameters",results:"https://atomicdata.dev/properties/endpoint/results"},search:{query:"https://atomicdata.dev/properties/search/query",limit:"https://atomicdata.dev/properties/search/limit",property:"https://atomicdata.dev/properties/search/property"},redirect:{destination:"https://atomicdata.dev/properties/destination",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent"},invite:{agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write"},file:{filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments"},chatRoom:{messages:"https://atomicdata.dev/properties/messages",nextPage:"https://atomicdata.dev/properties/nextPage",replyTo:"https://atomicdata.dev/properties/replyTo"},bookmark:{url:"https://atomicdata.dev/property/url",preview:"https://atomicdata.dev/property/preview",imageUrl:"https://atomicdata.dev/properties/imageUrl"},constraints:{max:"https://atomicdata.dev/properties/max",min:"https://atomicdata.dev/properties/min",maxFloat:"https://atomicdata.dev/properties/maxFloat",minFloat:"https://atomicdata.dev/properties/minFloat",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",dateFormat:"https://atomicdata.dev/properties/dateFormat"},table:{tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths"},ontology:{customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning"},color:"https://atomicdata.dev/properties/color",emoji:"https://atomicdata.dev/properties/emoji",classes:"https://atomicdata.dev/properties/classes",properties:"https://atomicdata.dev/properties/properties",instances:"https://atomicdata.dev/properties/instances"},Ib={atomicUrl:"https://atomicdata.dev/datatypes/atomicURL",boolean:"https://atomicdata.dev/datatypes/boolean",date:"https://atomicdata.dev/datatypes/date",float:"https://atomicdata.dev/datatypes/float",integer:"https://atomicdata.dev/datatypes/integer",markdown:"https://atomicdata.dev/datatypes/markdown",resourceArray:"https://atomicdata.dev/datatypes/resourceArray",slug:"https://atomicdata.dev/datatypes/slug",string:"https://atomicdata.dev/datatypes/string",timestamp:"https://atomicdata.dev/datatypes/timestamp"},YE={publicAgent:"https://atomicdata.dev/agents/publicAgent",displayStyleGrid:"https://atomicdata.dev/agents/publicAgent",numberFormats:{number:"https://atomicdata.dev/classes/NumberFormat/number",percentage:"https://atomicdata.dev/classes/NumberFormat/Percentage",currency:"https://atomicdata.dev/ontology/data-browser/number-format/vAikhI3z"},dateFormats:{localNumeric:"https://atomicdata.dev/classes/DateFormat/localNumeric",localLong:"https://atomicdata.dev/classes/DateFormat/localLong",localRelative:"https://atomicdata.dev/classes/DateFormat/localRelative"}},Iz={import:"/import"},F={properties:K,endpoints:Iz,classes:ft,datatypes:Ib,instances:YE};function XE(e,t,n){var r=e.replace(/(^\w+:|^)\/\//,"");if(typeof window<"u"&&(window!=null&&window.location)&&r.startsWith(window.location.hostname)&&(r=r.slice(window.location.hostname.length)),r.length<=t)return r;if(n){var i=r.length-t;return"..."+r.slice(i)}return r.slice(0,t)+"..."}var zf=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Jc=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},fd=function(e){return this instanceof fd?(this.v=e,this):new fd(e)},Tz=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(m){r[m]&&(i[m]=function(g){return new Promise(function(y,v){o.push([m,g,y,v])>1||s(m,g)})})}function s(m,g){try{u(r[m](g))}catch(y){f(o[0][3],y)}}function u(m){m.value instanceof fd?Promise.resolve(m.value.v).then(l,d):f(o[0][2],m)}function l(m){s("next",m)}function d(m){s("throw",m)}function f(m,g){m(g),o.shift(),o.length&&s(o[0][0],o[0][1])}},Oz=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Tb=="function"?Tb(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,u){a=e[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}},Tb=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Nz=function(){function e(t,n,r,i){i===void 0&&(i=!1),this.__internalObject=this,this.pages=new Map,this._totalMembers=0,this.store=t,this.server=n,this.params=r,i||(this._waitForReady=this.fetchPage(0)),this.clearPages=this.clearPages.bind(this)}return Object.defineProperty(e.prototype,"property",{get:function(){return this.params.property},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.params.value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortBy",{get:function(){return this.params.sort_by},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortDesc",{get:function(){return!!this.params.sort_desc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return parseInt(this.params.page_size,10)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalMembers",{get:function(){return this._totalMembers},enumerable:!1,configurable:!0}),e.prototype.waitForReady=function(){return this._waitForReady},e.prototype.getMemberWithIndex=function(t){return zf(this,void 0,void 0,function(){var n,r,i;return Jc(this,function(o){switch(o.label){case 0:if(t>=this.totalMembers)throw new Error("Index out of bounds");return n=Math.floor(t/this.pageSize),this.pages.has(n)?[3,2]:(this._waitForReady=this.fetchPage(n),[4,this._waitForReady]);case 1:o.sent(),o.label=2;case 2:return r=this.pages.get(n),i=r.getArray(F.properties.collection.members),[2,i[t%this.pageSize]]}})})},e.prototype.clearPages=function(){this.pages=new Map},e.prototype.refresh=function(){return zf(this,void 0,void 0,function(){return Jc(this,function(t){return this.clearPages(),this._waitForReady=this.fetchPage(0),[2,this._waitForReady]})})},e.prototype.clone=function(){var t=new e(this.store,this.server,this.params);return t._totalMembers=this._totalMembers,t._waitForReady=this._waitForReady,t.pages=this.pages,t},e.prototype[Symbol.asyncIterator]=function(){return Tz(this,arguments,function(){var n;return Jc(this,function(r){switch(r.label){case 0:return[4,fd(this.waitForReady())];case 1:r.sent(),n=0,r.label=2;case 2:return n<this.totalMembers?[4,fd(this.getMemberWithIndex(n))]:[3,6];case 3:return[4,r.sent()];case 4:r.sent(),r.label=5;case 5:return n++,[3,2];case 6:return[2]}})})},e.prototype.getAllMembers=function(){var t,n,r,i;return zf(this,void 0,void 0,function(){var o,a,s,u,l,d,f;return Jc(this,function(m){switch(m.label){case 0:o=this.params.page_size,this.params.page_size="1000",a=[],m.label=1;case 1:m.trys.push([1,6,7,12]),s=!0,u=Oz(this),m.label=2;case 2:return[4,u.next()];case 3:if(l=m.sent(),t=l.done,!!t)return[3,5];i=l.value,s=!1;try{d=i,a.push(d)}finally{s=!0}m.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return f=m.sent(),n={error:f},[3,12];case 7:return m.trys.push([7,,10,11]),!s&&!t&&(r=u.return)?[4,r.call(u)]:[3,9];case 8:m.sent(),m.label=9;case 9:return[3,11];case 10:if(n)throw n.error;return[7];case 11:return[7];case 12:return this.params.page_size=o,[2,a]}})})},e.prototype.buildSubject=function(t){var n,r,i=new URL("".concat(this.server,"/query"));try{for(var o=Tb(Object.entries(this.params)),a=o.next();!a.done;a=o.next()){var s=Dz(a.value,2),u=s[0],l=s[1];i.searchParams.set(u,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i.searchParams.set("current_page","".concat(t)),i.toString()},e.prototype.fetchPage=function(t){return zf(this,void 0,void 0,function(){var n,r,i;return Jc(this,function(o){switch(o.label){case 0:return n=this.buildSubject(t),[4,this.store.fetchResourceFromServer(n)];case 1:if(r=o.sent(),!r)throw new Error("Invalid collection: resource does not exist");if(r.error)throw new Error("Invalid collection: resource has error: ".concat(r.error));if(this.pages.set(t,r),i=r.get(F.properties.collection.totalMembers),!Ym(i))throw new Error("Invalid collection: total-members is not a number");return this._totalMembers=i,[2]}})})},e}();function Ov(e){return e.__internalObject!==e&&console.warn("Attempted to proxy a proxy for a collection"),new Proxy(e.__internalObject,{})}var Mz=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},$z=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Lz=function(){function e(t,n){this.params={page_size:"30"},this.store=t,this.server=n??new URL(t.getServerUrl()).origin}return e.prototype.setProperty=function(t){return this.params.property=t,this},e.prototype.setValue=function(t){return this.params.value=t,this},e.prototype.setSortBy=function(t){return this.params.sort_by=t,this},e.prototype.setSortDesc=function(t){return this.params.sort_desc=t,this},e.prototype.setPageSize=function(t){return this.params.page_size="".concat(t),this},e.prototype.build=function(){return new Nz(this.store,this.server,this.params)},e.prototype.buildAndFetch=function(){return Mz(this,void 0,void 0,function(){var t;return $z(this,function(n){switch(n.label){case 0:return t=this.build(),[4,t.waitForReady()];case 1:return n.sent(),[2,t]}})})},e}();rF();var QE=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},JE=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Bn=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},M8=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function ae(e,t){e===void 0&&(e=Nt);var n=be(),r=Bn(h.useState(function(){return n.getResourceLoading(e,t)}),2),i=r[0],o=r[1];return h.useEffect(function(){return o(Hh(n.getResourceLoading(e,t))),n.subscribe(e,function(a){o(Hh(a))})},[n,e]),i}function Uh(e,t){t===void 0&&(t={});var n=Bn(h.useState(new Map),2),r=n[0],i=n[1],o=be();return h.useEffect(function(){function a(s){i(function(u){return u.set(s.getSubject(),Hh(s)),new Map(u)})}return i(function(s){var u,l;try{for(var d=M8(e),f=d.next();!f.done;f=d.next()){var m=f.value,g=o.getResourceLoading(m,t);s.set(m,Hh(g)),o.subscribe(m,a)}}catch(y){u={error:y}}finally{try{f&&!f.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}return new Map(s)}),function(){var s,u;try{for(var l=M8(e),d=l.next();!d.done;d=l.next()){var f=d.value;o.unsubscribe(f,a)}}catch(m){s={error:m}}finally{try{d&&!d.done&&(u=l.return)&&u.call(l)}finally{if(s)throw s.error}}}},[e,o]),r}function qr(e){var t=ae(e);if(t.loading)return{subject:e,datatype:Z.UNKNOWN,shortname:"loading",description:"Loading property ".concat(e),loading:!0};if(t.error)return{subject:e,datatype:Z.UNKNOWN,shortname:"error",description:"Error getting Property. "+t.error.message,error:t.error};var n=t.get(F.properties.datatype),r=zE(n),i=t.get(F.properties.shortname),o=t.get(F.properties.description),a=t.get(F.properties.classType),s=!!t.get(F.properties.isDynamic),u={subject:e,datatype:r,shortname:i,description:o,classType:a,isDynamic:s};return u}function io(e,t,n){var r=this;n===void 0&&(n={});var i=n.commit,o=i===void 0?!1:i,a=n.validate,s=a===void 0?!0:a,u=n.commitDebounce,l=u===void 0?100:u,d=n.handleValidationError,f=Bn(h.useState(void 0),2),m=f[0],g=f[1],y=be(),v=Bn(n9(function(){o&&e.save(y).catch(function(p){return y.notifyError(p)})},l,[e,y]),2),_=v[0],x=v[1],S=h.useCallback(function(p){return QE(r,void 0,void 0,function(){var w;return JE(this,function(b){switch(b.label){case 0:if(p===void 0)return e.removePropVal(t),g(void 0),_(),[2];g(p),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,e.set(t,p,y,s)];case 2:return b.sent(),_(),d==null||d(void 0),[3,4];case 3:return w=b.sent(),d?d(w):y.notifyError(w),[3,4];case 4:return[2]}})})},[e,d,y,s,_]);if(x)return[m,S];var C=void 0;try{C=e.get(t)}catch(p){y.notifyError(p)}return[C,S]}function re(e,t,n){var r=Bn(io(e,t,n),2),i=r[0],o=r[1];return typeof i=="string"?[i,o]:i===void 0?[void 0,o]:[Ab(i),o]}var ZE="error:no_support_for_editing_nested_resources_yet";function oo(e,t,n){var r=Bn(io(e,t,n),2),i=r[0],o=r[1];return i?typeof i=="string"?[i,o]:[ZE,o]:[void 0,o]}var Fz={commit:!0};function nt(e,t,n){t===void 0&&(t=40),n===void 0&&(n=Fz);var r=Bn(re(e,F.properties.name,n),2),i=r[0],o=r[1],a=Bn(re(e,F.properties.shortname,n),2),s=a[0],u=a[1],l=Bn(re(e,F.properties.file.filename,n),2),d=l[0],f=l[1];if(e.loading)return["...",o];if(i!==void 0)return[i,o];if(s!==void 0)return[s,u];if(d!==void 0)return[d,f];var m=e==null?void 0:e.getSubject();return typeof m=="string"&&m.length>0?[XE(m,t),o]:[m,o]}function Se(e,t,n){var r=Bn(io(e,t,n),2),i=r[0],o=r[1],a=h.useRef([]),s=be(),u=h.useMemo(function(){if(i===void 0)return a.current;try{return Iu(i)}catch(d){return console.error(d,i,t,e.getSubject()),a.current}},[i,e,t]),l=h.useCallback(function(d){e.pushPropVal(t,d),n!=null&&n.commit&&e.save(s)},[e,t,s]);return[u,o,l]}function ao(e,t,n){var r=Bn(io(e,t,n),2),i=r[0],o=r[1];return i===void 0?[void 0,o]:[Pz(i),o]}function e9(e,t,n){var r=Bn(io(e,t,n),2),i=r[0],o=r[1];return i===void 0?[!1,o]:[Rz(i),o]}function zz(e,t,n){var r=be(),i=Bn(io(e,t,n),1),o=i[0];if(o!==void 0)try{return KE(o)}catch(a){r.notifyError(a);return}}function be(){var e=h.useContext(t9);if(e===void 0)throw new Error("Store is not found in react context. Have you wrapped your application in `<StoreContext.Provider value={new Store}>`?");return e}function Sr(e,t){var n=be(),r=Bn(h.useState(!1),2),i=r[0],o=r[1],a=Bn(h.useState(void 0),2),s=a[0],u=a[1],l=n.getAgent();return h.useEffect(function(){if(t===void 0&&(t=l==null?void 0:l.subject),t===void 0){u("No Agent set"),o(!1);return}if(e.new){o(!0);return}u("Checking write rights...");function d(){return QE(this,void 0,void 0,function(){var f,m,g;return JE(this,function(y){switch(y.label){case 0:return[4,e.canWrite(n,t)];case 1:return f=Bn.apply(void 0,[y.sent(),2]),m=f[0],g=f[1],o(m),u(m?void 0:"You don't have write rights in this resource or its parents: "+g),[2]}})})}d()},[e,t,l==null?void 0:l.subject]),[i,s]}var t9=h.createContext(new GE),Bz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xm=function(){var e=be(),t=Bz(Di("serverUrl",e.getServerUrl()),2),n=t[0],r=t[1],i=h.useCallback(function(o){if(o){var a="https://atomicdata.dev";bn.isValidSubject(o)?a=o:e.notifyError(new Error("Invalid base URL: ".concat(o,", defaulting to atomicdata.dev"))),r(a),e.setServerUrl(a)}},[e]);return[n,i]},Cx=function(){var e=be(),t=h.useCallback(function(r){return e.on($r.AgentChanged,r)},[e]),n=h.useSyncExternalStore(t,e.getAgent);return[n,e.setAgent]},Hz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Uz=function(e){var t=be(),n=e.getChildrenCollection(),r=ae(n),i=Hz(Se(r,K.collection.members),1),o=i[0];return h.useEffect(function(){t.fetchResourceFromServer(n)},[t]),o},Wz=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Vz=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Hp=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Dv=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};function Wh(e,t){var n=Hp(h.useState(e),2),r=n[0],i=n[1];return h.useEffect(function(){var o=setTimeout(function(){i(e)},t);return function(){clearTimeout(o)}},[e,t]),r}function n9(e,t,n){var r=this,i=h.useRef(),o=Hp(h.useState(!1),2),a=o[0],s=o[1],u=h.useCallback(function(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];i.current&&clearTimeout(i.current);var f=setTimeout(function(){return Wz(r,void 0,void 0,function(){return Vz(this,function(m){switch(m.label){case 0:return[4,e.apply(void 0,Dv([],Hp(l),!1))];case 1:return m.sent(),i.current=void 0,s(!1),[2]}})})},t);s(!0),i.current=f},Dv(Dv([],Hp(n),!1),[t,i],!1));return[u,a]}var qz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Gz=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zc=new Map;function Di(e,t){var n=qz(h.useState(function(){try{var a=window.localStorage.getItem(e);return a==="undefined"?t:a?JSON.parse(a):t}catch(s){return console.error("Error finding ".concat(e," in localStorage:"),s),t}}),2),r=n[0],i=n[1],o=h.useCallback(function(a){var s,u;try{var l=a instanceof Function?a(r):a;try{for(var d=Gz(Zc.get(e)||[]),f=d.next();!f.done;f=d.next()){var m=f.value;m(l)}}catch(g){s={error:g}}finally{try{f&&!f.done&&(u=d.return)&&u.call(d)}finally{if(s)throw s.error}}window.localStorage.setItem(e,JSON.stringify(l))}catch(g){console.error(g)}},[r,e]);return h.useEffect(function(){var a;return Zc.has(e)||Zc.set(e,new Set),(a=Zc.get(e))===null||a===void 0||a.add(i),function(){var s;(s=Zc.get(e))===null||s===void 0||s.delete(i)}},[e]),[r,o]}K.name,K.shortname,K.file.filename,K.description,K.write,K.read;var Nv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Kz={results:[],loading:!1,error:void 0};function qd(e,t){var n;t===void 0&&(t={});var r=t.debounce,i=r===void 0?50:r,o=be(),a=Nv(h.useState([]),2),s=a[0],u=a[1],l=Nv(Xm(),1),d=l[0],f=(n=Wh(e,i))!==null&&n!==void 0?n:"",m=h.useMemo(function(){return gz(d,f,t)},[f,t,d]),g=ae(m,{noWebSocket:!0}),y=Nv(Se(g,F.properties.endpoint.results),1),v=y[0];h.useEffect(function(){!g.loading&&v&&u(v)},[v==null?void 0:v.toString(),g.loading]),h.useEffect(function(){return function(){UE(o)}},[]);var _=h.useMemo(function(){return{results:s,loading:g.loading,error:g.error}},[s,g.loading,g.error]);return!e&&!t.allowEmptyQuery?Kz:_}var Yz=function(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Xz=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},$8=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},L8=function(e,t,n,r){var i=n.property,o=n.value,a=n.sort_by,s=n.sort_desc,u=new Lz(e,t);return i&&u.setProperty(i),o&&u.setValue(o),a&&u.setSortBy(a),s!==void 0&&u.setSortDesc(s),r&&u.setPageSize(r),u.build()};function jo(e,t){var n=this,r=be(),i=$8(Xm(),1),o=i[0],a=Qz(e),s=$8(h.useState(function(){return L8(r,o,a,t)}),2),u=s[0],l=s[1];h.useEffect(function(){u.waitForReady().then(function(){l(Ov(u.__internalObject))})},[]),h.useEffect(function(){var f=L8(r,o,a,t);f.waitForReady().then(function(){l(Ov(f.__internalObject))})},[a,t,r,o]);var d=h.useCallback(function(){return Yz(n,void 0,void 0,function(){return Xz(this,function(f){switch(f.label){case 0:return[4,u.refresh()];case 1:return f.sent(),l(Ov(u.__internalObject)),[2]}})})},[u,r,o,e,t]);return{collection:u,invalidateCollection:d}}function Qz(e){return h.useMemo(function(){return e},[e.property,e.value,e.sort_by,e.sort_desc])}var Jz=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function _x(e,t){var n=Jz(h.useState(Nt),2),r=n[0],i=n[1],o=ae(r);return h.useEffect(function(){e.getMemberWithIndex(t).then(i)},[e,t]),o}var bt=function(){return bt=Object.assign||function(t){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)&&(t[o]=n[o])}return t},bt.apply(this,arguments)};function r9(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yc(e,t,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(d){try{l(r.next(d))}catch(f){a(f)}}function u(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function bc(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return u([l,d])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Zz(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function eB(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Zz(arguments[t]));return e}function ks(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function tB(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var nB=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,rB=tB(function(e){return nB.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),_t="-ms-",Tu="-moz-",it="-webkit-",i9="comm",Qm="rule",kx="decl",iB="@import",o9="@keyframes",oB="@layer",aB=Math.abs,jx=String.fromCharCode,Ob=Object.assign;function sB(e,t){return hn(e,0)^45?(((t<<2^hn(e,0))<<2^hn(e,1))<<2^hn(e,2))<<2^hn(e,3):0}function a9(e){return e.trim()}function xo(e,t){return(e=t.exec(e))?e[0]:e}function We(e,t,n){return e.replace(t,n)}function Up(e,t){return e.indexOf(t)}function hn(e,t){return e.charCodeAt(t)|0}function tc(e,t,n){return e.slice(t,n)}function Ji(e){return e.length}function s9(e){return e.length}function gu(e,t){return t.push(e),e}function lB(e,t){return e.map(t).join("")}function F8(e,t){return e.filter(function(n){return!xo(n,t)})}var Jm=1,nc=1,l9=0,gi=0,Zt=0,wc="";function Zm(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Jm,column:nc,length:a,return:"",siblings:s}}function Zo(e,t){return Ob(Zm("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function sl(e){for(;e.root;)e=Zo(e.root,{children:[e]});gu(e,e.siblings)}function cB(){return Zt}function uB(){return Zt=gi>0?hn(wc,--gi):0,nc--,Zt===10&&(nc=1,Jm--),Zt}function zi(){return Zt=gi<l9?hn(wc,gi++):0,nc++,Zt===10&&(nc=1,Jm++),Zt}function ms(){return hn(wc,gi)}function Wp(){return gi}function eg(e,t){return tc(wc,e,t)}function Db(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dB(e){return Jm=nc=1,l9=Ji(wc=e),gi=0,[]}function fB(e){return wc="",e}function Mv(e){return a9(eg(gi-1,Nb(e===91?e+2:e===40?e+1:e)))}function pB(e){for(;(Zt=ms())&&Zt<33;)zi();return Db(e)>2||Db(Zt)>3?"":" "}function hB(e,t){for(;--t&&zi()&&!(Zt<48||Zt>102||Zt>57&&Zt<65||Zt>70&&Zt<97););return eg(e,Wp()+(t<6&&ms()==32&&zi()==32))}function Nb(e){for(;zi();)switch(Zt){case e:return gi;case 34:case 39:e!==34&&e!==39&&Nb(Zt);break;case 40:e===41&&Nb(e);break;case 92:zi();break}return gi}function mB(e,t){for(;zi()&&e+Zt!==57;)if(e+Zt===84&&ms()===47)break;return"/*"+eg(t,gi-1)+"*"+jx(e===47?e:zi())}function gB(e){for(;!Db(ms());)zi();return eg(e,gi)}function vB(e){return fB(Vp("",null,null,null,[""],e=dB(e),0,[0],e))}function Vp(e,t,n,r,i,o,a,s,u){for(var l=0,d=0,f=a,m=0,g=0,y=0,v=1,_=1,x=1,S=0,C="",p=i,w=o,b=r,k=C;_;)switch(y=S,S=zi()){case 40:if(y!=108&&hn(k,f-1)==58){Up(k+=We(Mv(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Mv(S);break;case 9:case 10:case 13:case 32:k+=pB(y);break;case 92:k+=hB(Wp()-1,7);continue;case 47:switch(ms()){case 42:case 47:gu(yB(mB(zi(),Wp()),t,n,u),u);break;default:k+="/"}break;case 123*v:s[l++]=Ji(k)*x;case 125*v:case 59:case 0:switch(S){case 0:case 125:_=0;case 59+d:x==-1&&(k=We(k,/\f/g,"")),g>0&&Ji(k)-f&&gu(g>32?B8(k+";",r,n,f-1,u):B8(We(k," ","")+";",r,n,f-2,u),u);break;case 59:k+=";";default:if(gu(b=z8(k,t,n,l,d,i,s,C,p=[],w=[],f,o),o),S===123)if(d===0)Vp(k,t,b,b,p,o,f,s,w);else switch(m===99&&hn(k,3)===110?100:m){case 100:case 108:case 109:case 115:Vp(e,b,b,r&&gu(z8(e,b,b,0,0,i,s,C,i,p=[],f,w),w),i,w,f,s,r?p:w);break;default:Vp(k,b,b,b,[""],w,0,s,w)}}l=d=g=0,v=x=1,C=k="",f=a;break;case 58:f=1+Ji(k),g=y;default:if(v<1){if(S==123)--v;else if(S==125&&v++==0&&uB()==125)continue}switch(k+=jx(S),S*v){case 38:x=d>0?1:(k+="\f",-1);break;case 44:s[l++]=(Ji(k)-1)*x,x=1;break;case 64:ms()===45&&(k+=Mv(zi())),m=ms(),d=f=Ji(C=k+=gB(Wp())),S++;break;case 45:y===45&&Ji(k)==2&&(v=0)}}return o}function z8(e,t,n,r,i,o,a,s,u,l,d,f){for(var m=i-1,g=i===0?o:[""],y=s9(g),v=0,_=0,x=0;v<r;++v)for(var S=0,C=tc(e,m+1,m=aB(_=a[v])),p=e;S<y;++S)(p=a9(_>0?g[S]+" "+C:We(C,/&\f/g,g[S])))&&(u[x++]=p);return Zm(e,t,n,i===0?Qm:s,u,l,d,f)}function yB(e,t,n,r){return Zm(e,t,n,i9,jx(cB()),tc(e,2,-2),0,r)}function B8(e,t,n,r,i){return Zm(e,t,n,kx,tc(e,0,r),tc(e,r+1,-1),r,i)}function c9(e,t,n){switch(sB(e,t)){case 5103:return it+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return it+e+e;case 4789:return Tu+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return it+e+Tu+e+_t+e+e;case 5936:switch(hn(e,t+11)){case 114:return it+e+_t+We(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return it+e+_t+We(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return it+e+_t+We(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return it+e+_t+e+e;case 6165:return it+e+_t+"flex-"+e+e;case 5187:return it+e+We(e,/(\w+).+(:[^]+)/,it+"box-$1$2"+_t+"flex-$1$2")+e;case 5443:return it+e+_t+"flex-item-"+We(e,/flex-|-self/g,"")+(xo(e,/flex-|baseline/)?"":_t+"grid-row-"+We(e,/flex-|-self/g,""))+e;case 4675:return it+e+_t+"flex-line-pack"+We(e,/align-content|flex-|-self/g,"")+e;case 5548:return it+e+_t+We(e,"shrink","negative")+e;case 5292:return it+e+_t+We(e,"basis","preferred-size")+e;case 6060:return it+"box-"+We(e,"-grow","")+it+e+_t+We(e,"grow","positive")+e;case 4554:return it+We(e,/([^-])(transform)/g,"$1"+it+"$2")+e;case 6187:return We(We(We(e,/(zoom-|grab)/,it+"$1"),/(image-set)/,it+"$1"),e,"")+e;case 5495:case 3959:return We(e,/(image-set\([^]*)/,it+"$1$`$1");case 4968:return We(We(e,/(.+:)(flex-)?(.*)/,it+"box-pack:$3"+_t+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+it+e+e;case 4200:if(!xo(e,/flex-|baseline/))return _t+"grid-column-align"+tc(e,t)+e;break;case 2592:case 3360:return _t+We(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,i){return t=i,xo(r.props,/grid-\w+-end/)})?~Up(e+(n=n[t].value),"span")?e:_t+We(e,"-start","")+e+_t+"grid-row-span:"+(~Up(n,"span")?xo(n,/\d+/):+xo(n,/\d+/)-+xo(e,/\d+/))+";":_t+We(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return xo(r.props,/grid-\w+-start/)})?e:_t+We(We(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return We(e,/(.+)-inline(.+)/,it+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ji(e)-1-t>6)switch(hn(e,t+1)){case 109:if(hn(e,t+4)!==45)break;case 102:return We(e,/(.+:)(.+)-([^]+)/,"$1"+it+"$2-$3$1"+Tu+(hn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Up(e,"stretch")?c9(We(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return We(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,o,a,s,u,l){return _t+i+":"+o+l+(a?_t+i+"-span:"+(s?u:+u-+o)+l:"")+e});case 4949:if(hn(e,t+6)===121)return We(e,":",":"+it)+e;break;case 6444:switch(hn(e,hn(e,14)===45?18:11)){case 120:return We(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+it+(hn(e,14)===45?"inline-":"")+"box$3$1"+it+"$2$3$1"+_t+"$2box$3")+e;case 100:return We(e,":",":"+_t)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return We(e,"scroll-","scroll-snap-")+e}return e}function Vh(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function bB(e,t,n,r){switch(e.type){case oB:if(e.children.length)break;case iB:case kx:return e.return=e.return||e.value;case i9:return"";case o9:return e.return=e.value+"{"+Vh(e.children,r)+"}";case Qm:if(!Ji(e.value=e.props.join(",")))return""}return Ji(n=Vh(e.children,r))?e.return=e.value+"{"+n+"}":""}function wB(e){var t=s9(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function xB(e){return function(t){t.root||(t=t.return)&&e(t)}}function SB(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case kx:e.return=c9(e.value,e.length,n);return;case o9:return Vh([Zo(e,{value:We(e.value,"@","@"+it)})],r);case Qm:if(e.length)return lB(n=e.props,function(i){switch(xo(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":sl(Zo(e,{props:[We(i,/:(read-\w+)/,":"+Tu+"$1")]})),sl(Zo(e,{props:[i]})),Ob(e,{props:F8(n,r)});break;case"::placeholder":sl(Zo(e,{props:[We(i,/:(plac\w+)/,":"+it+"input-$1")]})),sl(Zo(e,{props:[We(i,/:(plac\w+)/,":"+Tu+"$1")]})),sl(Zo(e,{props:[We(i,/:(plac\w+)/,_t+"input-$1")]})),sl(Zo(e,{props:[i]})),Ob(e,{props:F8(n,r)});break}return""})}}var CB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Or={},rc=typeof process<"u"&&Or!==void 0&&(Or.REACT_APP_SC_ATTR||Or.SC_ATTR)||"data-styled",Ex=typeof window<"u"&&"HTMLElement"in window,_B=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&Or!==void 0&&Or.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Or.REACT_APP_SC_DISABLE_SPEEDY!==""?Or.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Or.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&Or!==void 0&&Or.SC_DISABLE_SPEEDY!==void 0&&Or.SC_DISABLE_SPEEDY!==""&&Or.SC_DISABLE_SPEEDY!=="false"&&Or.SC_DISABLE_SPEEDY),kB={},tg=Object.freeze([]),ic=Object.freeze({});function u9(e,t,n){return n===void 0&&(n=ic),e.theme!==n.theme&&e.theme||t||n.theme}var d9=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),jB=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,EB=/(^-|-$)/g;function H8(e){return e.replace(jB,"-").replace(EB,"")}var RB=/(a)(d)/gi,U8=function(e){return String.fromCharCode(e+(e>25?39:97))};function Mb(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=U8(t%52)+n;return(U8(t%52)+n).replace(RB,"$1-$2")}var $v,Il=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},f9=function(e){return Il(5381,e)};function Rx(e){return Mb(f9(e)>>>0)}function PB(e){return e.displayName||e.name||"Component"}function Lv(e){return typeof e=="string"&&!0}var p9=typeof Symbol=="function"&&Symbol.for,h9=p9?Symbol.for("react.memo"):60115,AB=p9?Symbol.for("react.forward_ref"):60112,IB={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},TB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},m9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},OB=(($v={})[AB]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$v[h9]=m9,$v);function W8(e){return("type"in(t=e)&&t.type.$$typeof)===h9?m9:"$$typeof"in e?OB[e.$$typeof]:IB;var t}var DB=Object.defineProperty,NB=Object.getOwnPropertyNames,V8=Object.getOwnPropertySymbols,MB=Object.getOwnPropertyDescriptor,$B=Object.getPrototypeOf,q8=Object.prototype;function g9(e,t,n){if(typeof t!="string"){if(q8){var r=$B(t);r&&r!==q8&&g9(e,r,n)}var i=NB(t);V8&&(i=i.concat(V8(t)));for(var o=W8(e),a=W8(t),s=0;s<i.length;++s){var u=i[s];if(!(u in TB||n&&n[u]||a&&u in a||o&&u in o)){var l=MB(t,u);try{DB(e,u,l)}catch{}}}}return e}function js(e){return typeof e=="function"}function Px(e){return typeof e=="object"&&"styledComponentId"in e}function cs(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function qh(e,t){if(e.length===0)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function pd(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function $b(e,t,n){if(n===void 0&&(n=!1),!n&&!pd(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=$b(e[r],t[r]);else if(pd(t))for(var r in t)e[r]=$b(e[r],t[r]);return e}function Ax(e,t){Object.defineProperty(e,"toString",{value:t})}function Ea(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var LB=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r<t;r++)n+=this.groupSizes[r];return n},e.prototype.insertRules=function(t,n){if(t>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,o=i;t>=o;)if((o<<=1)<0)throw Ea(16,"".concat(t));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var a=i;a<o;a++)this.groupSizes[a]=0}for(var s=this.indexOfGroup(t+1),u=(a=0,n.length);a<u;a++)this.tag.insertRule(s,n[a])&&(this.groupSizes[t]++,s++)},e.prototype.clearGroup=function(t){if(t<this.length){var n=this.groupSizes[t],r=this.indexOfGroup(t),i=r+n;this.groupSizes[t]=0;for(var o=r;o<i;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(t){var n="";if(t>=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],i=this.indexOfGroup(t),o=i+r,a=i;a<o;a++)n+="".concat(this.tag.getRule(a)).concat(`/*!sc*/
`);return n},e}(),qp=new Map,Gh=new Map,Fv=1,Bf=function(e){if(qp.has(e))return qp.get(e);for(;Gh.has(Fv);)Fv++;var t=Fv++;return qp.set(e,t),Gh.set(t,e),t},FB=function(e,t){qp.set(e,t),Gh.set(t,e)},zB="style[".concat(rc,"][").concat("data-styled-version",'="').concat("6.0.7",'"]'),BB=new RegExp("^".concat(rc,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),HB=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},UB=function(e,t){for(var n,r=((n=t.textContent)!==null&&n!==void 0?n:"").split(`/*!sc*/
`),i=[],o=0,a=r.length;o<a;o++){var s=r[o].trim();if(s){var u=s.match(BB);if(u){var l=0|parseInt(u[1],10),d=u[2];l!==0&&(FB(d,l),HB(e,d,u[3]),e.getTag().insertRules(l,i)),i.length=0}else i.push(s)}}};function WB(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var v9=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(s){var u=Array.from(s.querySelectorAll("style[".concat(rc,"]")));return u[u.length-1]}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(rc,"active"),r.setAttribute("data-styled-version","6.0.7");var a=WB();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},VB=function(){function e(t){this.element=v9(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,o=r.length;i<o;i++){var a=r[i];if(a.ownerNode===n)return a}throw Ea(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var n=this.sheet.cssRules[t];return n&&n.cssText?n.cssText:""},e}(),qB=function(){function e(t){this.element=v9(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,n){if(t<=this.length&&t>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),GB=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,n){return t<=this.length&&(this.rules.splice(t,0,n),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),G8=Ex,KB={isServer:!Ex,useCSSOMInjection:!_B},Kh=function(){function e(t,n,r){t===void 0&&(t=ic),n===void 0&&(n={});var i=this;this.options=bt(bt({},KB),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Ex&&G8&&(G8=!1,function(o){for(var a=document.querySelectorAll(zB),s=0,u=a.length;s<u;s++){var l=a[s];l&&l.getAttribute(rc)!=="active"&&(UB(o,l),l.parentNode&&l.parentNode.removeChild(l))}}(this)),Ax(this,function(){return function(o){for(var a=o.getTag(),s=a.length,u="",l=function(f){var m=function(x){return Gh.get(x)}(f);if(m===void 0)return"continue";var g=o.names.get(m),y=a.getGroup(f);if(g===void 0||y.length===0)return"continue";var v="".concat(rc,".g").concat(f,'[id="').concat(m,'"]'),_="";g!==void 0&&g.forEach(function(x){x.length>0&&(_+="".concat(x,","))}),u+="".concat(y).concat(v,'{content:"').concat(_,'"}').concat(`/*!sc*/
`)},d=0;d<s;d++)l(d);return u}(i)})}return e.registerId=function(t){return Bf(t)},e.prototype.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(bt(bt({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(n){var r=n.useCSSOMInjection,i=n.target;return n.isServer?new GB(i):r?new VB(i):new qB(i)}(this.options),new LB(t)));var t},e.prototype.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.prototype.registerName=function(t,n){if(Bf(t),this.names.has(t))this.names.get(t).add(n);else{var r=new Set;r.add(n),this.names.set(t,r)}},e.prototype.insertRules=function(t,n,r){this.registerName(t,n),this.getTag().insertRules(Bf(t),r)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Bf(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),YB=/&/g,XB=/^\s*\/\/.*$/gm;function y9(e,t){return e.map(function(n){return n.type==="rule"&&(n.value="".concat(t," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(t," ")),n.props=n.props.map(function(r){return"".concat(t," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=y9(n.children,t)),n})}function b9(e){var t,n,r,i=e===void 0?ic:e,o=i.options,a=o===void 0?ic:o,s=i.plugins,u=s===void 0?tg:s,l=function(m,g,y){return y===n||y.startsWith(n)&&y.endsWith(n)&&y.replaceAll(n,"").length>0?".".concat(t):m},d=u.slice();d.push(function(m){m.type===Qm&&m.value.includes("&")&&(m.props[0]=m.props[0].replace(YB,n).replace(r,l))}),a.prefix&&d.push(SB),d.push(bB);var f=function(m,g,y,v){g===void 0&&(g=""),y===void 0&&(y=""),v===void 0&&(v="&"),t=v,n=g,r=new RegExp("\\".concat(n,"\\b"),"g");var _=m.replace(XB,""),x=vB(y||g?"".concat(y," ").concat(g," { ").concat(_," }"):_);a.namespace&&(x=y9(x,a.namespace));var S=[];return Vh(x,wB(d.concat(xB(function(C){return S.push(C)})))),S};return f.hash=u.length?u.reduce(function(m,g){return g.name||Ea(15),Il(m,g.name)},5381).toString():"",f}var QB=new Kh,Lb=b9(),Ix=le.createContext({shouldForwardProp:void 0,styleSheet:QB,stylis:Lb});Ix.Consumer;var JB=le.createContext(void 0);function Yh(){return h.useContext(Ix)}function ZB(e){var t=h.useState(e.stylisPlugins),n=t[0],r=t[1],i=Yh().styleSheet,o=h.useMemo(function(){var s=i;return e.sheet?s=e.sheet:e.target&&(s=s.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(s=s.reconstructWithOptions({useCSSOMInjection:!1})),s},[e.disableCSSOMInjection,e.sheet,e.target,i]),a=h.useMemo(function(){return b9({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);return h.useEffect(function(){wE(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),le.createElement(Ix.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:o,stylis:a}},le.createElement(JB.Provider,{value:a},e.children))}var w9=function(){function e(t,n){var r=this;this.inject=function(i,o){o===void 0&&(o=Lb);var a=r.name+o.hash;i.hasNameForId(r.id,a)||i.insertRules(r.id,a,o(r.rules,a,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,Ax(this,function(){throw Ea(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Lb),this.name+t.hash},e}(),eH=function(e){return e>="A"&&e<="Z"};function K8(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(n===1&&r==="-"&&e[0]==="-")return e;eH(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var x9=function(e){return e==null||e===!1||e===""},S9=function(e){var t,n,r=[];for(var i in e){var o=e[i];e.hasOwnProperty(i)&&!x9(o)&&(Array.isArray(o)&&o.isCss||js(o)?r.push("".concat(K8(i),":"),o,";"):pd(o)?r.push.apply(r,ks(ks(["".concat(i," {")],S9(o),!1),["}"],!1)):r.push("".concat(K8(i),": ").concat((t=i,(n=o)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||t in CB||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Sa(e,t,n,r){if(x9(e))return[];if(Px(e))return[".".concat(e.styledComponentId)];if(js(e)){if(!js(o=e)||o.prototype&&o.prototype.isReactComponent||!t)return[e];var i=e(t);return Sa(i,t,n,r)}var o;return e instanceof w9?n?(e.inject(n,r),[e.getName(r)]):[e]:pd(e)?S9(e):Array.isArray(e)?Array.prototype.concat.apply(tg,e.map(function(a){return Sa(a,t,n,r)})):[e.toString()]}function C9(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(js(n)&&!Px(n))return!1}return!0}var tH=f9("6.0.7"),nH=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&C9(t),this.componentId=n,this.baseHash=Il(tH,n),this.baseStyle=r,Kh.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))i=cs(i,this.staticRulesId);else{var o=qh(Sa(this.rules,t,n,r)),a=Mb(Il(this.baseHash,o)>>>0);if(!n.hasNameForId(this.componentId,a)){var s=r(o,".".concat(a),void 0,this.componentId);n.insertRules(this.componentId,a,s)}i=cs(i,a),this.staticRulesId=a}else{for(var u=Il(this.baseHash,r.hash),l="",d=0;d<this.rules.length;d++){var f=this.rules[d];if(typeof f=="string")l+=f;else if(f){var m=qh(Sa(f,t,n,r));u=Il(u,m),l+=m}}if(l){var g=Mb(u>>>0);n.hasNameForId(this.componentId,g)||n.insertRules(this.componentId,g,r(l,".".concat(g),void 0,this.componentId)),i=cs(i,g)}}return i},e}(),oc=le.createContext(void 0);oc.Consumer;function rH(){var e=h.useContext(oc);if(!e)throw Ea(18);return e}function iH(e){var t=le.useContext(oc),n=h.useMemo(function(){return function(r,i){if(!r)throw Ea(14);if(js(r)){var o=r(i);return o}if(Array.isArray(r)||typeof r!="object")throw Ea(8);return i?bt(bt({},i),r):r}(e.theme,t)},[e.theme,t]);return e.children?le.createElement(oc.Provider,{value:n},e.children):null}var zv={};function oH(e,t,n){var r=Px(e),i=e,o=!Lv(e),a=t.attrs,s=a===void 0?tg:a,u=t.componentId,l=u===void 0?function(C,p){var w=typeof C!="string"?"sc":H8(C);zv[w]=(zv[w]||0)+1;var b="".concat(w,"-").concat(Rx("6.0.7"+w+zv[w]));return p?"".concat(p,"-").concat(b):b}(t.displayName,t.parentComponentId):u,d=t.displayName;d===void 0&&function(C){return Lv(C)?"styled.".concat(C):"Styled(".concat(PB(C),")")}(e);var f=t.displayName&&t.componentId?"".concat(H8(t.displayName),"-").concat(t.componentId):t.componentId||l,m=r&&i.attrs?i.attrs.concat(s).filter(Boolean):s,g=t.shouldForwardProp;if(r&&i.shouldForwardProp){var y=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;g=function(C,p){return y(C,p)&&v(C,p)}}else g=y}var _=new nH(n,f,r?i.componentStyle:void 0);function x(C,p){return function(w,b,k){var E=w.attrs,I=w.componentStyle,j=w.defaultProps,P=w.foldedComponentIds,B=w.styledComponentId,W=w.target,D=le.useContext(oc),L=Yh(),T=w.shouldForwardProp||L.shouldForwardProp,V=function(z,Ce,Ee){for(var ye,Re=bt(bt({},Ce),{className:void 0,theme:Ee}),Oe=0;Oe<z.length;Oe+=1){var rt=js(ye=z[Oe])?ye(Re):ye;for(var Pe in rt)Re[Pe]=Pe==="className"?cs(Re[Pe],rt[Pe]):Pe==="style"?bt(bt({},Re[Pe]),rt[Pe]):rt[Pe]}return Ce.className&&(Re.className=cs(Re.className,Ce.className)),Re}(E,b,u9(b,D,j)||ic),H=V.as||W,q={};for(var N in V)V[N]===void 0||N[0]==="$"||N==="as"||N==="theme"||(N==="forwardedAs"?q.as=V.forwardedAs:T&&!T(N,H)||(q[N]=V[N]));var J=function(z,Ce){var Ee=Yh(),ye=z.generateAndInjectStyles(Ce,Ee.styleSheet,Ee.stylis);return ye}(I,V),se=cs(P,B);return J&&(se+=" "+J),V.className&&(se+=" "+V.className),q[Lv(H)&&!d9.has(H)?"class":"className"]=se,q.ref=k,h.createElement(H,q)}(S,C,p)}var S=le.forwardRef(x);return S.attrs=m,S.componentStyle=_,S.shouldForwardProp=g,S.foldedComponentIds=r?cs(i.foldedComponentIds,i.styledComponentId):"",S.styledComponentId=f,S.target=r?i.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=r?function(p){for(var w=[],b=1;b<arguments.length;b++)w[b-1]=arguments[b];for(var k=0,E=w;k<E.length;k++)$b(p,E[k],!0);return p}({},i.defaultProps,C):C}}),Ax(S,function(){return".".concat(S.styledComponentId)}),o&&g9(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function Y8(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var X8=function(e){return Object.assign(e,{isCss:!0})};function cn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(js(e)||pd(e)){var r=e;return X8(Sa(Y8(tg,ks([r],t,!0))))}var i=e;return t.length===0&&i.length===1&&typeof i[0]=="string"?Sa(i):X8(Sa(Y8(i,t)))}function Fb(e,t,n){if(n===void 0&&(n=ic),!t)throw Ea(1,t);var r=function(i){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,cn.apply(void 0,ks([i],o,!1)))};return r.attrs=function(i){return Fb(e,t,bt(bt({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},r.withConfig=function(i){return Fb(e,t,bt(bt({},n),i))},r}var _9=function(e){return Fb(oH,e)},A=_9;d9.forEach(function(e){A[e]=_9(e)});var aH=function(){function e(t,n){this.rules=t,this.componentId=n,this.isStatic=C9(t),Kh.registerId(this.componentId+1)}return e.prototype.createStyles=function(t,n,r,i){var o=i(qh(Sa(this.rules,n,r,i)),""),a=this.componentId+t;r.insertRules(a,a,o)},e.prototype.removeStyles=function(t,n){n.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,n,r,i){t>2&&Kh.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,n,r,i)},e}();function sH(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=cn.apply(void 0,ks([e],t,!1)),i="sc-global-".concat(Rx(JSON.stringify(r))),o=new aH(r,i),a=function(u){var l=Yh(),d=le.useContext(oc),f=le.useRef(l.styleSheet.allocateGSInstance(i)).current;return l.styleSheet.server&&s(f,u,l.styleSheet,d,l.stylis),le.useLayoutEffect(function(){if(!l.styleSheet.server)return s(f,u,l.styleSheet,d,l.stylis),function(){return o.removeStyles(f,l.styleSheet)}},[f,u,l.styleSheet,d,l.stylis]),null};function s(u,l,d,f,m){if(o.isStatic)o.renderStyles(u,kB,d,m);else{var g=bt(bt({},l),{theme:u9(l,f,a.defaultProps)});o.renderStyles(u,g,d,m)}}return le.memo(a)}function $o(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=qh(cn.apply(void 0,ks([e],t,!1))),i=Rx(r);return new w9(i,r)}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pe.apply(this,arguments)}function hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function md(e,t){return md=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},md(e,t)}function ng(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,md(e,t)}function zb(e){return zb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zb(e)}function lH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function cH(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gp(e,t,n){return cH()?Gp=Reflect.construct.bind():Gp=function(i,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(i,s),l=new u;return a&&md(l,a.prototype),l},Gp.apply(null,arguments)}function Bb(e){var t=typeof Map=="function"?new Map:void 0;return Bb=function(r){if(r===null||!lH(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Gp(r,arguments,zb(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),md(i,r)},Bb(e)}var to=function(e){ng(t,e);function t(n){var r;return r=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this,hd(r)}return t}(Bb(Error));function Bv(e){return Math.round(e*255)}function uH(e,t,n){return Bv(e)+","+Bv(t)+","+Bv(n)}function gd(e,t,n,r){if(r===void 0&&(r=uH),t===0)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,u=0,l=0;i>=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,l=a):i>=3&&i<4?(u=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);var d=n-o/2,f=s+d,m=u+d,g=l+d;return r(f,m,g)}var Q8={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function dH(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Q8[t]?"#"+Q8[t]:e}var fH=/^#[a-fA-F0-9]{6}$/,pH=/^#[a-fA-F0-9]{8}$/,hH=/^#[a-fA-F0-9]{3}$/,mH=/^#[a-fA-F0-9]{4}$/,Hv=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,gH=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,vH=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,yH=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Tx(e){if(typeof e!="string")throw new to(3);var t=dH(e);if(t.match(fH))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(pH)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(hH))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(mH)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=Hv.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=gH.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var a=vH.exec(t);if(a){var s=parseInt(""+a[1],10),u=parseInt(""+a[2],10)/100,l=parseInt(""+a[3],10)/100,d="rgb("+gd(s,u,l)+")",f=Hv.exec(d);if(!f)throw new to(4,t,d);return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10)}}var m=yH.exec(t.substring(0,50));if(m){var g=parseInt(""+m[1],10),y=parseInt(""+m[2],10)/100,v=parseInt(""+m[3],10)/100,_="rgb("+gd(g,y,v)+")",x=Hv.exec(_);if(!x)throw new to(4,t,_);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}throw new to(5)}function bH(e){var t=e.red/255,n=e.green/255,r=e.blue/255,i=Math.max(t,n,r),o=Math.min(t,n,r),a=(i+o)/2;if(i===o)return e.alpha!==void 0?{hue:0,saturation:0,lightness:a,alpha:e.alpha}:{hue:0,saturation:0,lightness:a};var s,u=i-o,l=a>.5?u/(2-i-o):u/(i+o);switch(i){case t:s=(n-r)/u+(n<r?6:0);break;case n:s=(r-t)/u+2;break;default:s=(t-n)/u+4;break}return s*=60,e.alpha!==void 0?{hue:s,saturation:l,lightness:a,alpha:e.alpha}:{hue:s,saturation:l,lightness:a}}function Gd(e){return bH(Tx(e))}var wH=function(t){return t.length===7&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t},Hb=wH;function es(e){var t=e.toString(16);return t.length===1?"0"+t:t}function Uv(e){return es(Math.round(e*255))}function xH(e,t,n){return Hb("#"+Uv(e)+Uv(t)+Uv(n))}function Xh(e,t,n){return gd(e,t,n,xH)}function SH(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Xh(e,t,n);if(typeof e=="object"&&t===void 0&&n===void 0)return Xh(e.hue,e.saturation,e.lightness);throw new to(1)}function CH(e,t,n,r){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?Xh(e,t,n):"rgba("+gd(e,t,n)+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?Xh(e.hue,e.saturation,e.lightness):"rgba("+gd(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new to(2)}function Ub(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Hb("#"+es(e)+es(t)+es(n));if(typeof e=="object"&&t===void 0&&n===void 0)return Hb("#"+es(e.red)+es(e.green)+es(e.blue));throw new to(6)}function k9(e,t,n,r){if(typeof e=="string"&&typeof t=="number"){var i=Tx(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?Ub(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?Ub(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new to(7)}var _H=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},kH=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&typeof t.alpha=="number"},jH=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},EH=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&typeof t.alpha=="number"};function Kd(e){if(typeof e!="object")throw new to(8);if(kH(e))return k9(e);if(_H(e))return Ub(e);if(EH(e))return CH(e);if(jH(e))return SH(e);throw new to(8)}function j9(e,t,n){return function(){var i=n.concat(Array.prototype.slice.call(arguments));return i.length>=t?e.apply(this,i):j9(e,t,i)}}function Yd(e){return j9(e,e.length,[])}function E9(e){if(e==="transparent")return e;var t=Gd(e);return Kd(pe({},t,{hue:(t.hue+180)%360}))}function Ox(e,t,n){return Math.max(e,Math.min(t,n))}function RH(e,t){if(t==="transparent")return t;var n=Gd(t);return Kd(pe({},n,{lightness:Ox(0,1,n.lightness-parseFloat(e))}))}var PH=Yd(RH),bo=PH;function AH(e,t){if(t==="transparent")return t;var n=Gd(t);return Kd(pe({},n,{lightness:Ox(0,1,n.lightness+parseFloat(e))}))}var IH=Yd(AH),Ii=IH;function TH(e,t){return t==="transparent"?t:Kd(pe({},Gd(t),{lightness:parseFloat(e)}))}var OH=Yd(TH),Ou=OH;function DH(e,t){return t==="transparent"?t:Kd(pe({},Gd(t),{saturation:parseFloat(e)}))}var NH=Yd(DH),MH=NH;function $H(e,t){if(t==="transparent")return t;var n=Tx(t),r=typeof n.alpha=="number"?n.alpha:1,i=pe({},n,{alpha:Ox(0,1,+(r*100-parseFloat(e)*100).toFixed(2)/100)});return k9(i)}var LH=Yd($H),Ra=LH,Fl;(function(e){e.always="always",e.never="never",e.auto="auto"})(Fl||(Fl={}));const FH=()=>{const[e,t]=h.useState(()=>Wv()),[n,r]=Di("darkMode","auto");function i(o){o===void 0?(t(Wv()),r("auto")):o===!0?(t(o),r("always")):o===!1&&(t(o),r("never"))}return h.useEffect(()=>{const o=s=>{n==="auto"&&t(s.matches)},a=window.matchMedia("(prefers-color-scheme: dark)");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),h.useEffect(()=>{n==="auto"?t(Wv()):n==="always"?t(!0):n==="never"&&t(!1)},[n]),[e,i,n]};function Wv(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}let zH={data:""},BH=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||zH,HH=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,UH=/\/\*[^]*?\*\/| +/g,J8=/\n+/g,sa=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?sa(a,o):o+"{"+sa(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=sa(a,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=sa.p?sa.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},vo={},R9=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+R9(e[n]);return t}return e},WH=(e,t,n,r,i)=>{let o=R9(e),a=vo[o]||(vo[o]=(u=>{let l=0,d=11;for(;l<u.length;)d=101*d+u.charCodeAt(l++)>>>0;return"go"+d})(o));if(!vo[a]){let u=o!==e?e:(l=>{let d,f,m=[{}];for(;d=HH.exec(l.replace(UH,""));)d[4]?m.shift():d[3]?(f=d[3].replace(J8," ").trim(),m.unshift(m[0][f]=m[0][f]||{})):m[0][d[1]]=d[2].replace(J8," ").trim();return m[0]})(e);vo[a]=sa(i?{["@keyframes "+a]:u}:u,n?"":"."+a)}let s=n&&vo.g?vo.g:null;return n&&(vo.g=vo[a]),((u,l,d,f)=>{f?l.data=l.data.replace(f,u):l.data.indexOf(u)===-1&&(l.data=d?u+l.data:l.data+u)})(vo[a],t,r,s),a},VH=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=u?"."+u:s&&typeof s=="object"?s.props?"":sa(s,""):s===!1?"":s}return r+i+(a??"")},"");function rg(e){let t=this||{},n=e.call?e(t.p):e;return WH(n.unshift?n.raw?VH(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,BH(t.target),t.g,t.o,t.k)}let P9,Wb,Vb;rg.bind({g:1});let To=rg.bind({k:1});function qH(e,t,n,r){sa.p=t,P9=e,Wb=n,Vb=r}function Ba(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),u=s.className||i.className;n.p=Object.assign({theme:Wb&&Wb()},s),n.o=/ *go\d+/.test(u),s.className=rg.apply(n,r)+(u?" "+u:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Vb&&l[0]&&Vb(s),P9(l,s)}return t?t(i):i}}var GH=e=>typeof e=="function",Qh=(e,t)=>GH(e)?e(t):e,KH=(()=>{let e=0;return()=>(++e).toString()})(),A9=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),YH=20,Kp=new Map,XH=1e3,Z8=e=>{if(Kp.has(e))return;let t=setTimeout(()=>{Kp.delete(e),$s({type:4,toastId:e})},XH);Kp.set(e,t)},QH=e=>{let t=Kp.get(e);t&&clearTimeout(t)},qb=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,YH)};case 1:return t.toast.id&&QH(t.toast.id),{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return e.toasts.find(o=>o.id===n.id)?qb(e,{type:1,toast:n}):qb(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Z8(r):e.toasts.forEach(o=>{Z8(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Yp=[],Xp={toasts:[],pausedAt:void 0},$s=e=>{Xp=qb(Xp,e),Yp.forEach(t=>{t(Xp)})},JH={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ZH=(e={})=>{let[t,n]=h.useState(Xp);h.useEffect(()=>(Yp.push(n),()=>{let i=Yp.indexOf(n);i>-1&&Yp.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var o,a;return{...e,...e[i.type],...i,duration:i.duration||((o=e[i.type])==null?void 0:o.duration)||(e==null?void 0:e.duration)||JH[i.type],style:{...e.style,...(a=e[i.type])==null?void 0:a.style,...i.style}}});return{...t,toasts:r}},eU=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||KH()}),Xd=e=>(t,n)=>{let r=eU(t,e,n);return $s({type:2,toast:r}),r.id},vr=(e,t)=>Xd("blank")(e,t);vr.error=Xd("error");vr.success=Xd("success");vr.loading=Xd("loading");vr.custom=Xd("custom");vr.dismiss=e=>{$s({type:3,toastId:e})};vr.remove=e=>$s({type:4,toastId:e});vr.promise=(e,t,n)=>{let r=vr.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(vr.success(Qh(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{vr.error(Qh(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var tU=(e,t)=>{$s({type:1,toast:{id:e,height:t}})},nU=()=>{$s({type:5,time:Date.now()})},rU=e=>{let{toasts:t,pausedAt:n}=ZH(e);h.useEffect(()=>{if(n)return;let o=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let u=(s.duration||0)+s.pauseDuration-(o-s.createdAt);if(u<0){s.visible&&vr.dismiss(s.id);return}return setTimeout(()=>vr.dismiss(s.id),u)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=h.useCallback(()=>{n&&$s({type:6,time:Date.now()})},[n]),i=h.useCallback((o,a)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=a||{},d=t.filter(g=>(g.position||l)===(o.position||l)&&g.height),f=d.findIndex(g=>g.id===o.id),m=d.filter((g,y)=>y<f&&g.visible).length;return d.filter(g=>g.visible).slice(...s?[m+1]:[0,m]).reduce((g,y)=>g+(y.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:tU,startPause:nU,endPause:r,calculateOffset:i}}},iU=To`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,oU=To`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,aU=To`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,sU=Ba("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${iU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${oU} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${aU} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,lU=To`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,cU=Ba("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${lU} 1s linear infinite;
`,uU=To`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,dU=To`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,fU=Ba("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${uU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${dU} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,pU=Ba("div")`
position: absolute;
`,hU=Ba("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,mU=To`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,gU=Ba("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${mU} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,vU=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?h.createElement(gU,null,t):t:n==="blank"?null:h.createElement(hU,null,h.createElement(cU,{...r}),n!=="loading"&&h.createElement(pU,null,n==="error"?h.createElement(sU,{...r}):h.createElement(fU,{...r})))},yU=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,bU=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,wU="0%{opacity:0;} 100%{opacity:1;}",xU="0%{opacity:1;} 100%{opacity:0;}",SU=Ba("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,CU=Ba("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,_U=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=A9()?[wU,xU]:[yU(n),bU(n)];return{animation:t?`${To(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${To(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},I9=h.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?_U(e.position||t||"top-center",e.visible):{opacity:0},o=h.createElement(vU,{toast:e}),a=h.createElement(CU,{...e.ariaProps},Qh(e.message,e));return h.createElement(SU,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:o,message:a}):h.createElement(h.Fragment,null,o,a))});qH(h.createElement);var kU=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let o=h.useCallback(a=>{if(a){let s=()=>{let u=a.getBoundingClientRect().height;r(e,u)};s(),new MutationObserver(s).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return h.createElement("div",{ref:o,className:t,style:n},i)},jU=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:A9()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},EU=rg`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Hf=16,RU=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:a})=>{let{toasts:s,handlers:u}=rU(n);return h.createElement("div",{style:{position:"fixed",zIndex:9999,top:Hf,left:Hf,right:Hf,bottom:Hf,pointerEvents:"none",...o},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},s.map(l=>{let d=l.position||t,f=u.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),m=jU(d,f);return h.createElement(kU,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?EU:"",style:m},l.type==="custom"?Qh(l.message,l):i?i(l):h.createElement(I9,{toast:l,position:d}))}))},lt=vr;function PU(){const[e,t]=h.useState(!1),n=h.useRef(null),r=h.useCallback(()=>t(!0),[]),i=h.useCallback(()=>t(!1),[]),o=h.useCallback(u=>{var l;(l=n.current)!=null&&l.contains(u.target)&&t(!0)},[]),a=h.useCallback(()=>{var u;(u=n.current)!=null&&u.contains(document.activeElement)||t(!1)},[]),s=h.useMemo(()=>({onMouseOver:r,onMouseOut:i,onFocus:o,onBlur:a}),[r,i,o,a]);return window.matchMedia("(pointer: coarse)").matches?[n,!1,{}]:[n,e,s]}var T9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},eS=le.createContext&&le.createContext(T9),Ca=function(){return Ca=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ca.apply(this,arguments)},AU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function O9(e){return e&&e.map(function(t,n){return le.createElement(t.tag,Ca({key:n},t.attr),O9(t.child))})}function fe(e){return function(t){return le.createElement(IU,Ca({attr:Ca({},e.attr)},t),O9(e.child))}}function IU(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=AU(e,["attr","size","title"]),s=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),le.createElement("svg",Ca({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:Ca(Ca({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&le.createElement("title",null,o),e.children)};return eS!==void 0?le.createElement(eS.Consumer,null,function(n){return t(n)}):t(T9)}function TU(e){return fe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function OU(e){return fe({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function DU(e){return fe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"}}]})(e)}function NU(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"}}]})(e)}function MU(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"}}]})(e)}function ig(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function D9(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function $U(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function Dx(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M223.99908,224a32,32,0,1,0,32.00782,32A32.06431,32.06431,0,0,0,223.99908,224Zm214.172-96c-10.877-19.5-40.50979-50.75-116.27544-41.875C300.39168,34.875,267.63386,0,223.99908,0s-76.39066,34.875-97.89653,86.125C50.3369,77.375,20.706,108.5,9.82907,128-6.54984,157.375-5.17484,201.125,34.958,256-5.17484,310.875-6.54984,354.625,9.82907,384c29.13087,52.375,101.64652,43.625,116.27348,41.875C147.60842,477.125,180.36429,512,223.99908,512s76.3926-34.875,97.89652-86.125c14.62891,1.75,87.14456,10.5,116.27544-41.875C454.55,354.625,453.175,310.875,413.04017,256,453.175,201.125,454.55,157.375,438.171,128ZM63.33886,352c-4-7.25-.125-24.75,15.00391-48.25,6.87695,6.5,14.12891,12.875,21.88087,19.125,1.625,13.75,4,27.125,6.75,40.125C82.34472,363.875,67.09081,358.625,63.33886,352Zm36.88478-162.875c-7.752,6.25-15.00392,12.625-21.88087,19.125-15.12891-23.5-19.00392-41-15.00391-48.25,3.377-6.125,16.37891-11.5,37.88478-11.5,1.75,0,3.875.375,5.75.375C104.09864,162.25,101.84864,175.625,100.22364,189.125ZM223.99908,64c9.50195,0,22.25586,13.5,33.88282,37.25-11.252,3.75-22.50391,8-33.88282,12.875-11.377-4.875-22.62892-9.125-33.88283-12.875C201.74516,77.5,214.49712,64,223.99908,64Zm0,384c-9.502,0-22.25392-13.5-33.88283-37.25,11.25391-3.75,22.50587-8,33.88283-12.875C235.378,402.75,246.62994,407,257.8819,410.75,246.25494,434.5,233.501,448,223.99908,448Zm0-112a80,80,0,1,1,80-80A80.00023,80.00023,0,0,1,223.99908,336ZM384.6593,352c-3.625,6.625-19.00392,11.875-43.63479,11,2.752-13,5.127-26.375,6.752-40.125,7.75195-6.25,15.00391-12.625,21.87891-19.125C384.7843,327.25,388.6593,344.75,384.6593,352ZM369.65538,208.25c-6.875-6.5-14.127-12.875-21.87891-19.125-1.625-13.5-3.875-26.875-6.752-40.25,1.875,0,4.002-.375,5.752-.375,21.50391,0,34.50782,5.375,37.88283,11.5C388.6593,167.25,384.7843,184.75,369.65538,208.25Z"}}]})(e)}function LU(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"}}]})(e)}function N9(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"}}]})(e)}function FU(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"}}]})(e)}function M9(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"}}]})(e)}function Nx(e){return fe({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"}}]})(e)}function zU(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zm-204.686-98.059l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.248-16.379-6.249-22.628 0L184 302.745l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.25 16.379 6.25 22.628.001z"}}]})(e)}function BU(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function HU(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM273 369.9l135.5-135.5c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L256 285.1 154.4 183.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L239 369.9c9.4 9.4 24.6 9.4 34 0z"}}]})(e)}function UU(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"}}]})(e)}function tS(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}}]})(e)}function Mx(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"}}]})(e)}function $x(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]})(e)}function WU(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z"}}]})(e)}function Lx(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function og(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function VU(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"}}]})(e)}function Fx(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Ha(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"}}]})(e)}function ag(e){return fe({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"}}]})(e)}function zx(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"}}]})(e)}function qU(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M212.686 315.314L120 408l32.922 31.029c15.12 15.12 4.412 40.971-16.97 40.971h-112C10.697 480 0 469.255 0 456V344c0-21.382 25.803-32.09 40.922-16.971L72 360l92.686-92.686c6.248-6.248 16.379-6.248 22.627 0l25.373 25.373c6.249 6.248 6.249 16.378 0 22.627zm22.628-118.628L328 104l-32.922-31.029C279.958 57.851 290.666 32 312.048 32h112C437.303 32 448 42.745 448 56v112c0 21.382-25.803 32.09-40.922 16.971L376 152l-92.686 92.686c-6.248 6.248-16.379 6.248-22.627 0l-25.373-25.373c-6.249-6.248-6.249-16.378 0-22.627z"}}]})(e)}function sg(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"}}]})(e)}function nS(e){return fe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function vd(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function $9(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function GU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zM128.4 336c-17.9 0-32.4 12.1-32.4 27 0 15 14.6 27 32.5 27s32.4-12.1 32.4-27-14.6-27-32.5-27zM224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6z"}}]})(e)}function KU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-64 268c0 10.7-12.9 16-20.5 8.5L104 376H76c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h28l35.5-36.5c7.6-7.6 20.5-2.2 20.5 8.5v136zm33.2-47.6c9.1-9.3 9.1-24.1 0-33.4-22.1-22.8 12.2-56.2 34.4-33.5 27.2 27.9 27.2 72.4 0 100.4-21.8 22.3-56.9-10.4-34.4-33.5zm86-117.1c54.4 55.9 54.4 144.8 0 200.8-21.8 22.4-57-10.3-34.4-33.5 36.2-37.2 36.3-96.5 0-133.8-22.1-22.8 12.3-56.3 34.4-33.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function YU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-96 144c0 4.42-3.58 8-8 8h-8c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h8c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-8c-26.51 0-48-21.49-48-48v-32c0-26.51 21.49-48 48-48h8c4.42 0 8 3.58 8 8v16zm44.27 104H160c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h12.27c5.95 0 10.41-3.5 10.41-6.62 0-1.3-.75-2.66-2.12-3.84l-21.89-18.77c-8.47-7.22-13.33-17.48-13.33-28.14 0-21.3 19.02-38.62 42.41-38.62H200c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-12.27c-5.95 0-10.41 3.5-10.41 6.62 0 1.3.75 2.66 2.12 3.84l21.89 18.77c8.47 7.22 13.33 17.48 13.33 28.14.01 21.29-19 38.62-42.39 38.62zM256 264v20.8c0 20.27 5.7 40.17 16 56.88 10.3-16.7 16-36.61 16-56.88V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v20.8c0 35.48-12.88 68.89-36.28 94.09-3.02 3.25-7.27 5.11-11.72 5.11s-8.7-1.86-11.72-5.11c-23.4-25.2-36.28-58.61-36.28-94.09V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8zm121-159L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"}}]})(e)}function XU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm60.1 106.5L224 336l60.1 93.5c5.1 8-.6 18.5-10.1 18.5h-34.9c-4.4 0-8.5-2.4-10.6-6.3C208.9 405.5 192 373 192 373c-6.4 14.8-10 20-36.6 68.8-2.1 3.9-6.1 6.3-10.5 6.3H110c-9.5 0-15.2-10.5-10.1-18.5l60.3-93.5-60.3-93.5c-5.2-8 .6-18.5 10.1-18.5h34.8c4.4 0 8.5 2.4 10.6 6.3 26.1 48.8 20 33.6 36.6 68.5 0 0 6.1-11.7 36.6-68.5 2.1-3.9 6.2-6.3 10.6-6.3H274c9.5-.1 15.2 10.4 10.1 18.4zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function QU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"}}]})(e)}function JU(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z"}}]})(e)}function ZU(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"}}]})(e)}function eW(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v38.059l55.029-55.013c15.011-15.01 40.971-4.491 40.971 16.97z"}}]})(e)}function tW(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm57.1 120H305c7.7 0 13.4 7.1 11.7 14.7l-38 168c-1.2 5.5-6.1 9.3-11.7 9.3h-38c-5.5 0-10.3-3.8-11.6-9.1-25.8-103.5-20.8-81.2-25.6-110.5h-.5c-1.1 14.3-2.4 17.4-25.6 110.5-1.3 5.3-6.1 9.1-11.6 9.1H117c-5.6 0-10.5-3.9-11.7-9.4l-37.8-168c-1.7-7.5 4-14.6 11.7-14.6h24.5c5.7 0 10.7 4 11.8 9.7 15.6 78 20.1 109.5 21 122.2 1.6-10.2 7.3-32.7 29.4-122.7 1.3-5.4 6.1-9.1 11.7-9.1h29.1c5.6 0 10.4 3.8 11.7 9.2 24 100.4 28.8 124 29.6 129.4-.2-11.2-2.6-17.8 21.6-129.2 1-5.6 5.9-9.5 11.5-9.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function Bx(e){return fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function nW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"}}]})(e)}function L9(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"}}]})(e)}function rS(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"}}]})(e)}function rW(e){return fe({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"}}]})(e)}function iW(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M96 32H32C14.33 32 0 46.33 0 64v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM288 32h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z"}}]})(e)}function Es(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"}}]})(e)}function F9(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M576 304v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48zm-48-80a79.557 79.557 0 0 1 30.777 6.165L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L17.223 230.165A79.557 79.557 0 0 1 48 224h480zm-48 96c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm-96 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"}}]})(e)}function lg(e){return fe({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"}}]})(e)}function oW(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function aW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"}}]})(e)}function sW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"}}]})(e)}function lW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function cW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function uW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"}}]})(e)}function dW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"}}]})(e)}function qn(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function fW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function pW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"}}]})(e)}function Qd(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(e)}function hW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M128,256A128,128,0,1,0,256,384,128,128,0,0,0,128,256Zm379-54.86L400.07,18.29a37.26,37.26,0,0,0-64.14,0L229,201.14C214.76,225.52,232.58,256,261.09,256H474.91C503.42,256,521.24,225.52,507,201.14ZM480,288H320a32,32,0,0,0-32,32V480a32,32,0,0,0,32,32H480a32,32,0,0,0,32-32V320A32,32,0,0,0,480,288Z"}}]})(e)}function z9(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M568.482 177.448L424.479 313.433C409.3 327.768 384 317.14 384 295.985v-71.963c-144.575.97-205.566 35.113-164.775 171.353 4.483 14.973-12.846 26.567-25.006 17.33C155.252 383.105 120 326.488 120 269.339c0-143.937 117.599-172.5 264-173.312V24.012c0-21.174 25.317-31.768 40.479-17.448l144.003 135.988c10.02 9.463 10.028 25.425 0 34.896zM384 379.128V448H64V128h50.916a11.99 11.99 0 0 0 8.648-3.693c14.953-15.568 32.237-27.89 51.014-37.676C185.708 80.83 181.584 64 169.033 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48v-88.806c0-8.288-8.197-14.066-16.011-11.302a71.83 71.83 0 0 1-34.189 3.377c-7.27-1.046-13.8 4.514-13.8 11.859z"}}]})(e)}function Vv(e){return fe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M216 288h-48c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V304c0-8.84-7.16-16-16-16zM88 384H40c-8.84 0-16 7.16-16 16v96c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16v-96c0-8.84-7.16-16-16-16zm256-192h-48c-8.84 0-16 7.16-16 16v288c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V208c0-8.84-7.16-16-16-16zm128-96h-48c-8.84 0-16 7.16-16 16v384c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112c0-8.84-7.16-16-16-16zM600 0h-48c-8.84 0-16 7.16-16 16v480c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z"}}]})(e)}function mW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function gW(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"}}]})(e)}function vW(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"}}]})(e)}function yW(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"}}]})(e)}function bW(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"}}]})(e)}function B9(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"}}]})(e)}function wW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"}}]})(e)}function xW(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z"}}]})(e)}function lo(e){return fe({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"}}]})(e)}function Ls(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function H9(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function U9(e){return fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function iS(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"}}]})(e)}function oS(e){return fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"}}]})(e)}function SW(e){return fe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}}]})(e)}const Fe={agentSettings:"/app/agent",themeSettings:"/app/theme",serverSettings:"/app/server",new:"/app/new",shortcuts:"/app/shortcuts",search:"/app/search",share:"/app/share",show:"/app/show",token:"/app/token",data:"/app/data",edit:"/app/edit",about:"/app/about",import:"/app/import",history:"/app/history",allVersions:"/all-versions",sandbox:"/sandbox",fetchBookmark:"/fetch-bookmark",pruneTests:"/prunetests"};function Fs(e,t){const n=new URLSearchParams(t);return`${e}?${n}`}function mt(e,t={}){if(e===Nt)return"#";const n=new URL(e);return window.location.origin===n.origin?n.pathname+n.search:Fs(Fe.show,{subject:e,...t})}function CW(e,t){return Fs(Fe.search,{query:e,...t?{queryscope:t}:{}})}function Rs(e){const[t,n]=EL(),r=o=>{o===void 0?t.delete(e):t.set(e,o),n(t)},i=t.get(e);return i===null?[void 0,r]:[i,r]}function W9(){return Rs("query")}const qv={classSubject:"classSubject",parent:"parent",newSubject:"newSubject"};function V9(e,t,n){const r=new URL(location.origin);return r.pathname=Fe.new,r.searchParams.append(qv.classSubject,e),t&&r.searchParams.append(qv.parent,t),n&&r.searchParams.append(qv.newSubject,n),Fe.new+r.search}function cg(e){return Fs(Fe.edit,{subject:e})}function _W(e){return Fs(Fe.share,{subject:e})}function q9(e){return Fs(Fe.data,{subject:e})}function kW(e){return window.location.origin+e}function jW(e){return Fs(Fe.import,{subject:e})}function EW(e){return Fs(Fe.history,{subject:e})}function RW(e,t){const n=new URL(t);return n.pathname=Fe.allVersions,n.searchParams.append("subject",e),mt(n.toString())}function Wn(...e){const t=n=>e.map(r=>`${r} ${n.animation.duration} ease-in-out`).join(",");return cn(["transition:",";"],({theme:n})=>t(n))}const G9=()=>c.jsx(PW,{viewBox:"0 0 50 50",children:c.jsx("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"})}),PW=A.svg.withConfig({displayName:"Spinner__StyledSpinner",componentId:"sc-ce6514f4-0"})(["animation:rotate 2s linear infinite;width:50px;height:50px;max-width:100%;max-height:100%;& .path{stroke:",";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"],e=>e.theme.colors.main),AW=({clean:e,icon:t,subtle:n,alert:r})=>{let i=Jd;return n&&(i=IW),r&&(i=TW),t&&(i=OW),e&&(i=ug),i},ue=h.forwardRef(({children:e,loading:t,...n},r)=>{const{icon:i,...o}=n,a=AW(n);return c.jsx(a,{type:"button",...o,ref:r,children:t?c.jsx(G9,{}):e})});ue.displayName="Button";const ug=A.button.withConfig({displayName:"Button__ButtonClean",componentId:"sc-366fe626-0"})(["cursor:pointer;border:none;font-size:inherit;padding:0;color:inherit;margin:0;appearance:none;background-color:initial;-webkit-tap-highlight-color:transparent;"]),K9=A(ug).withConfig({displayName:"Button__ButtonBase",componentId:"sc-366fe626-1"})(["height:2rem;display:flex;align-items:center;gap:1ch;justify-content:center;background-color:",";color:",";white-space:nowrap;margin-bottom:",";",";@media (hover:hover) and (pointer:fine){&:hover:not([disabled]),&:focus-visible:not([disabled]){border-color:",";outline:0;}}&:active:not([disabled]){transition:all 0s;}&:disabled{cursor:default;display:auto;opacity:0.5;}"],e=>e.theme.colors.main,e=>e.theme.colors.bg,e=>e.gutter?`${e.theme.margin}rem`:"",Wn("background-color","box-shadow","transform","color","border-color"),e=>e.theme.colors.main),Qp=A(ug).withConfig({displayName:"Button__ButtonBar",componentId:"sc-366fe626-2"})(["padding-right:0.5rem;padding-left:0.5rem;color:",";background-color:",";height:100%;display:flex;align-items:center;&:hover:not([disabled]),&:focus-visible:not([disabled]){background-color:",";}&:active:not([disabled]){background-color:",";}padding-left:",";padding-right:",";"],e=>e.theme.colors.main,e=>e.selected?e.theme.colors.bg2:e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.leftPadding?"1.2rem":"",e=>e.rightPadding?"1.2rem":""),Jd=A(K9).withConfig({displayName:"Button__ButtonDefault",componentId:"sc-366fe626-3"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";--button-text-color:",";--button-text-color-hover:",";padding:0.4rem;border-radius:",";padding-left:","rem;padding-right:","rem;display:inline-flex;background-color:var(--button-bg-color);color:var(--button-text-color);border:solid 1px var(--button-border-color);&:focus-visible:not([disabled]),&:hover:not([disabled]){box-shadow:",";background-color:var(--button-bg-color-hover);color:var(--button-text-color-hover);border-color:var(--button-border-color-hover);}&:active:not([disabled]){box-shadow:inset ",";}"],e=>e.theme.colors.main,e=>e.theme.colors.mainLight,e=>e.theme.colors.main,e=>e.theme.colors.mainLight,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.boxShadowSoft,e=>e.theme.boxShadowIntense),IW=A(Jd).withConfig({displayName:"Button__ButtonSubtle",componentId:"sc-366fe626-4"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";--button-text-color:",";--button-text-color-hover:",";box-shadow:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.boxShadow),TW=A(Jd).withConfig({displayName:"Button__ButtonAlert",componentId:"sc-366fe626-5"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";"],e=>e.theme.colors.alert,e=>e.theme.colors.alertLight,e=>e.theme.colors.alert,e=>e.theme.colors.alertLight),OW=A(Jd).withConfig({displayName:"Button__ButtonIcon",componentId:"sc-366fe626-6"})(["box-shadow:none;border-color:transparent;border-radius:999px;font-size:0.8rem;width:1.3rem;height:1.3rem;display:inline-flex;margin:0;padding:0;&:active:not([disabled]){box-shadow:",";}&:active:not([disabled]){box-shadow:inset ",";}"],e=>e.theme.boxShadowIntense,e=>e.theme.boxShadowIntense),us=A(K9).withConfig({displayName:"Button__ButtonInput",componentId:"sc-366fe626-7"})(["padding:0 0.5rem;background-color:",";color:",";flex:0;height:auto;border-left:solid 1px ",";border-radius:0;@media (hover:hover) and (pointer:fine){&:hover:not([disabled]),&:active:not([disabled]),&:focus-visible:not([disabled]){color:",";background-color:",";}}&:last-child{border-radius:",";border-top-left-radius:0;border-bottom-left-radius:0;}"],e=>e.theme.colors.bg,e=>e.theme.colors.textLight,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.bg1,e=>e.theme.radius);function or(e){const[t,n]=Rs("subject"),r=xt(),{pathname:i,search:o}=Ms();function a(s){const u=new URL(s);window.location.origin===u.origin?e?r(u.pathname+u.search,{replace:!0}):r(u.pathname+u.search):n(s)}if(t===void 0){if(i.startsWith("/app/"))return[void 0,a];const s=i==="/"?"":i;return[window.location.origin+s+o,a]}return[t,a]}function Jh(e){const[t,n]=or(),[r,i]=h.useState(void 0);h.useEffect(()=>{i(t?new URL(t).searchParams:void 0)},[t]);function o(s){if(!r||!t)return;s===void 0?r.delete(e):r.set(e,s);const u=new URL(t);s&&u.searchParams.set(e,s),(s===void 0||s===""||s===null)&&u.searchParams.delete(e),n(u.href)}let a=r==null?void 0:r.get(e);return a==null&&(a=void 0),[a,o]}const zl=A("span").withConfig({displayName:"SideBarItem",componentId:"sc-6624a4fe-0"})(["display:flex;min-height:","rem;align-items:center;justify-content:flex-start;color:",";padding:0.2rem;padding-left:1rem;text-overflow:ellipsis;text-decoration:none;border-radius:",";&:hover,&:focus{background-color:",";color:",";}&:active{background-color:",";}svg{font-size:0.8rem;}"],e=>e.theme.margin*.5+1,e=>e.disabled?e.theme.colors.main:e.theme.colors.textLight,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.disabled?e.theme.colors.main:e.theme.colors.text,e=>e.theme.colors.bg2),Y9=cn(["color:",";font-family:monospace;line-height:1.2rem;"],e=>e.theme.colors.alert),gt=A.span.withConfig({displayName:"ErrorLook",componentId:"sc-a8e7a5ba-0"})(["",""],Y9);function yd({error:e,showTrace:t}){return c.jsxs(DW,{children:[c.jsxs(NW,{children:[c.jsx(zx,{}),"Something went wrong"]}),c.jsx(aS,{children:e.message}),t&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"Stack trace:"}),c.jsx(aS,{children:e.stack})]})]})}const DW=A.div.withConfig({displayName:"ErrorLook__ErrorLookBig",componentId:"sc-a8e7a5ba-1"})(["color:",";font-size:1rem;padding:","rem;border-radius:",";border:1px solid ",";background-color:",";"],e=>e.theme.colors.alert,e=>e.theme.margin,e=>e.theme.radius,e=>Ii(.2,e.theme.colors.alert),e=>e.theme.colors.bg1),aS=A.code.withConfig({displayName:"ErrorLook__CodeBlock",componentId:"sc-a8e7a5ba-2"})(["white-space:pre-wrap;border-radius:",";padding:","rem;background-color:",";"],e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.colors.bg),NW=A.p.withConfig({displayName:"ErrorLook__BiggerText",componentId:"sc-a8e7a5ba-3"})(["font-size:1.3rem;display:flex;align-items:center;gap:1ch;"]);function X9(){return typeof window<"u"&&window.__TAURI_METADATA__!==void 0}const MW=e=>new Promise(t=>setTimeout(t,e));function Ua(){const e=xt(),{viewTransitionsEnabled:t}=Xe();return h.useCallback(r=>{if(!t||!document.startViewTransition){e(r);return}document.startViewTransition(async()=>new Promise(i=>{Ln.flushSync(()=>{e(r),MW(1).then(()=>{i()})})}))},[e])}const Ve=({children:e,clean:t,subject:n,path:r,href:i,untabbable:o,className:a,...s})=>{const u=Ua();if(!n&&!i&&!r)return c.jsx(gt,{children:"No `subject`, `path` or `href` passed to this AtomicLink."});let l;try{l=n?window.location.toString()===mt(n):!1}catch{return c.jsx("span",{children:n})}const d=m=>{if(!i){if(m.preventDefault(),r){u(r);return}if(n){if(l)return;u(mt(n))}}},f=i||n||kW(r);return c.jsxs($W,{clean:t,className:a,about:n,onClick:d,href:f,disabled:l,tabIndex:l||o?-1:0,target:X9()&&!i?"":"_blank",...s,children:[e,i&&!t&&c.jsx(sg,{})]})},$W=A.a.withConfig({displayName:"AtomicLink__LinkView",componentId:"sc-e31ed152-0"})(["color:",";text-decoration:none;cursor:pointer;pointer-events:",";&:hover{color:",";text-decoration:",";}&:active{color:",";}"],e=>e.disabled?e.theme.colors.text:e.theme.colors.main,e=>e.disabled?"none":"inherit",e=>e.theme.colors.mainLight,e=>e.clean?"none":"underline",e=>e.theme.colors.mainDark);function LW(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}const Q9=()=>RP*1.5;function dg({open:e,className:t,children:n}){const[r,i]=h.useState(e);return h.useEffect(()=>{if(!e)return LW(()=>{i(!1)},Q9());i(!0)},[e]),c.jsx(FW,{open:e,className:t,children:c.jsx(zW,{children:r&&n})})}const FW=A.div.withConfig({displayName:"Collapse__GridCollapser",componentId:"sc-cd0e6d60-0"})(["display:grid;grid-template-rows:",";transition:grid-template-rows ","ms ease-in-out;@media (prefers-reduced-motion){transition:unset;}"],({open:e})=>e?"1fr":"0fr",()=>Q9()),zW=A.div.withConfig({displayName:"Collapse__CollapseInner",componentId:"sc-cd0e6d60-1"})(["overflow:hidden;"]);function Bl({open:e,initialState:t,children:n,title:r,disabled:i,onStateToggle:o}){const[a,s]=h.useState(t);h.useEffect(()=>{s(e)},[e]);const u=h.useCallback(()=>{s(l=>(o==null||o(!l),!l))},[]);return c.jsxs(c.Fragment,{children:[c.jsxs(BW,{children:[c.jsx(WW,{type:"button",onClick:u,turn:!!a,hide:!!i,"aria-label":a?"collapse":"expand",children:c.jsx(UW,{})}),c.jsx(HW,{children:r})]}),c.jsx(VW,{open:!!a,children:n})]})}Bl.defaultProps={open:!1};const BW=A.div.withConfig({displayName:"Details__SummaryWrapper",componentId:"sc-a173c185-0"})(["max-width:100%;display:flex;align-items:center;gap:0.4rem;"]),HW=A.div.withConfig({displayName:"Details__TitleWrapper",componentId:"sc-a173c185-1"})(["flex:1;width:1px;*{user-select:none;}"]),UW=A(Nx).withConfig({displayName:"Details__Icon",componentId:"sc-a173c185-2"})(["color:",";margin-top:auto;cursor:pointer;*{cursor:pointer;}font-size:1.2rem;"],({theme:e})=>e.colors.main),WW=A.button.withConfig({displayName:"Details__IconButton",componentId:"sc-a173c185-3"})(["--speed:",";aspect-ratio:1/1;display:flex;align-items:center;padding:0.2rem;visibility:",";transition:transform var(--speed) ease-in-out,background-color var(--speed) ease;transform:rotate(",");background-color:transparent;border:none;border-radius:50%;&:hover,&:focus{background-color:",";}"],e=>e.theme.animation.duration,e=>e.hide?"hidden":"visible",e=>e.turn?"90deg":"0deg",e=>e.theme.colors.bg1),VW=A(dg).withConfig({displayName:"Details__StyledCollapse",componentId:"sc-a173c185-4"})(["overflow-x:hidden;margin-left:","rem;"],({theme:e})=>e.margin);function qW(e){const t=new URLSearchParams({...e?{parentSubject:e}:{}});return`${Fe.new}?${t.toString()}`}function J9(e){const t=xt();return h.useCallback(()=>{const r=qW(e);t(r)},[e])}var Pa;(function(e){e[e.Simple=0]="Simple",e[e.Outline=1]="Outline",e[e.Fill=2]="Fill",e[e.Colored=3]="Colored",e[e.Square=4]="Square"})(Pa||(Pa={}));const Wt=h.forwardRef(({variant:e,children:t,color:n,...r},i)=>{const o=tR.get(e)??eR;return c.jsx(o,{ref:i,color:n,...r,children:t})});Wt.displayName="IconButton";const Z9={variant:0,color:"inherit",size:"1em"};Wt.defaultProps=Z9;const Hx=h.forwardRef(({variant:e,children:t,color:n,...r},i)=>{const o=tR.get(e??0);return c.jsx(o,{ref:i,color:n,as:"a",...r,children:t})});Hx.displayName="IconButtonLink";Hx.defaultProps=Z9;const Zd=A.button.withConfig({displayName:"IconButton__IconButtonBase",componentId:"sc-2d67f7a8-0"})(["--button-padding:0.4em;cursor:pointer;display:inline-grid;place-items:center;",";color:",";font-size:",";border:none;user-select:none;padding:var(--button-padding);width:calc("," + var(--button-padding) * 2);height:calc("," + var(--button-padding) * 2);&[disabled]{opacity:0.5;cursor:not-allowed;}"],Wn("background-color","color","box-shadow","filter"),e=>e.theme.colors.text,e=>e.size??"1em",e=>e.size,e=>e.size),eR=A(Zd).withConfig({displayName:"IconButton__SimpleIconButton",componentId:"sc-2d67f7a8-1"})(["color:",";background-color:transparent;border-radius:",";&:not([disabled]){&:hover,&:focus-visible{background-color:",";}&:active{background-color:",";}}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.bg2),GW=A(Zd).withConfig({displayName:"IconButton__OutlineIconButton",componentId:"sc-2d67f7a8-2"})(["color:",";background-color:",";border-radius:50%;&:not([disabled]){&:hover,&:focus-visible{color:",";box-shadow:0px 0px 0px 1.5px ",",",";}}&&:active{background-color:",";color:white;}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),KW=A(Zd).withConfig({displayName:"IconButton__SquareIconButton",componentId:"sc-2d67f7a8-3"})(["color:",";background-color:",";border-radius:",";border:1px solid ",";&:not([disabled]){&:hover,&:focus-visible{color:",";border-color:",";box-shadow:",";}}&&:active{background-color:",";color:white;}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),YW=A(Zd).withConfig({displayName:"IconButton__FillIconButton",componentId:"sc-2d67f7a8-4"})(["color:",";background-color:unset;border-radius:50%;&:hover,&:focus-visible{color:white;background-color:",";box-shadow:",";}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.main,e=>e.theme.boxShadowSoft),XW=A(Zd).withConfig({displayName:"IconButton__ColoredIconButton",componentId:"sc-2d67f7a8-5"})(["color:white;background-color:",";border-radius:50%;&:hover,&:focus-visible{color:white;filter:brightness(1.3);box-shadow:",";}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.boxShadowSoft),tR=new Map([[0,eR],[1,GW],[2,YW],[3,XW],[4,KW]]),ef=(e,t="Open menu",n=Wt)=>{const r=({onClick:i,menuId:o,isActive:a},s)=>{const u=h.useId();return c.jsx(n,{id:u,"aria-controls":o,"aria-expanded":a,"aria-haspopup":"menu",onClick:i,ref:s,title:t,children:e})};return r.DisplayName="DefaultTrigger",r};var Gv=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Kv(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function nR(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function rR(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function QW(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o<n.length;o++)r.indexOf(n[o])===-1&&(i=!1);return i}var Ux={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Gv?173:189,"=":Gv?61:187,";":Gv?59:186,"'":222,"[":219,"]":221,"\\":220},Aa={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Gb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Pn={16:!1,18:!1,17:!1,91:!1},Jt={};for(var Uf=1;Uf<20;Uf++)Ux["f".concat(Uf)]=111+Uf;var Rt=[],sS=!1,iR="all",oR=[],fg=function(t){return Ux[t.toLowerCase()]||Aa[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function aR(e){iR=e||"all"}function bd(){return iR||"all"}function JW(){return Rt.slice(0)}function ZW(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function eV(e){return typeof e=="string"&&(e=fg(e)),Rt.indexOf(e)!==-1}function tV(e,t){var n,r;e||(e=bd());for(var i in Jt)if(Object.prototype.hasOwnProperty.call(Jt,i))for(n=Jt[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;bd()===e&&aR(t||"all")}function nV(e){var t=e.keyCode||e.which||e.charCode,n=Rt.indexOf(t);if(n>=0&&Rt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Rt.splice(0,Rt.length),(t===93||t===224)&&(t=91),t in Pn){Pn[t]=!1;for(var r in Aa)Aa[r]===t&&(zr[r]=!1)}}function rV(e){if(typeof e>"u")Object.keys(Jt).forEach(function(a){return delete Jt[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&Yv(a)});else if(typeof e=="object")e.key&&Yv(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];typeof i=="function"&&(o=i,i=""),Yv({key:e,scope:i,method:o,splitKey:"+"})}}var Yv=function(t){var n=t.key,r=t.scope,i=t.method,o=t.splitKey,a=o===void 0?"+":o,s=rR(n);s.forEach(function(u){var l=u.split(a),d=l.length,f=l[d-1],m=f==="*"?"*":fg(f);if(Jt[m]){r||(r=bd());var g=d>1?nR(Aa,l):[];Jt[m]=Jt[m].filter(function(y){var v=i?y.method===i:!0;return!(v&&y.scope===r&&QW(y.mods,g))})}})};function lS(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var o in Pn)Object.prototype.hasOwnProperty.call(Pn,o)&&(!Pn[o]&&t.mods.indexOf(+o)>-1||Pn[o]&&t.mods.indexOf(+o)===-1)&&(i=!1);(t.mods.length===0&&!Pn[16]&&!Pn[18]&&!Pn[17]&&!Pn[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function cS(e,t){var n=Jt["*"],r=e.keyCode||e.which||e.charCode;if(zr.filter.call(this,e)){if((r===93||r===224)&&(r=91),Rt.indexOf(r)===-1&&r!==229&&Rt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(y){var v=Gb[y];e[y]&&Rt.indexOf(v)===-1?Rt.push(v):!e[y]&&Rt.indexOf(v)>-1?Rt.splice(Rt.indexOf(v),1):y==="metaKey"&&e[y]&&Rt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Rt=Rt.slice(Rt.indexOf(v))))}),r in Pn){Pn[r]=!0;for(var i in Aa)Aa[i]===r&&(zr[i]=!0);if(!n)return}for(var o in Pn)Object.prototype.hasOwnProperty.call(Pn,o)&&(Pn[o]=e[Gb[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Rt.indexOf(17)===-1&&Rt.push(17),Rt.indexOf(18)===-1&&Rt.push(18),Pn[17]=!0,Pn[18]=!0);var a=bd();if(n)for(var s=0;s<n.length;s++)n[s].scope===a&&(e.type==="keydown"&&n[s].keydown||e.type==="keyup"&&n[s].keyup)&&lS(e,n[s],a,t);if(r in Jt){for(var u=0;u<Jt[r].length;u++)if((e.type==="keydown"&&Jt[r][u].keydown||e.type==="keyup"&&Jt[r][u].keyup)&&Jt[r][u].key){for(var l=Jt[r][u],d=l.splitKey,f=l.key.split(d),m=[],g=0;g<f.length;g++)m.push(fg(f[g]));m.sort().join("")===Rt.sort().join("")&&lS(e,l,a,t)}}}}function iV(e){return oR.indexOf(e)>-1}function zr(e,t,n){Rt=[];var r=rR(e),i=[],o="all",a=document,s=0,u=!1,l=!0,d="+",f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(f=t.capture),typeof t.splitKey=="string"&&(d=t.splitKey)),typeof t=="string"&&(o=t);s<r.length;s++)e=r[s].split(d),i=[],e.length>1&&(i=nR(Aa,e)),e=e[e.length-1],e=e==="*"?"*":fg(e),e in Jt||(Jt[e]=[]),Jt[e].push({keyup:u,keydown:l,scope:o,mods:i,shortcut:r[s],method:n,key:r[s],splitKey:d,element:a});typeof a<"u"&&!iV(a)&&window&&(oR.push(a),Kv(a,"keydown",function(m){cS(m,a)},f),sS||(sS=!0,Kv(window,"focus",function(){Rt=[]},f)),Kv(a,"keyup",function(m){cS(m,a),nV(m)},f))}function oV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Jt).forEach(function(n){var r=Jt[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var Xv={setScope:aR,getScope:bd,deleteScope:tV,getPressedKeyCodes:JW,isPressed:eV,filter:ZW,trigger:oV,unbind:rV,keyMap:Ux,modifier:Aa,modifierMap:Gb};for(var Qv in Xv)Object.prototype.hasOwnProperty.call(Xv,Qv)&&(zr[Qv]=Xv[Qv]);if(typeof window<"u"){var aV=window.hotkeys;zr.noConflict=function(e){return e&&window.hotkeys===zr&&(window.hotkeys=aV),zr},window.hotkeys=zr}zr.filter=function(){return!0};var sR=function(t,n){var r=t.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},sV=function(t){return sR(t,["INPUT","TEXTAREA","SELECT"])};function Me(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},o=i.enableOnTags,a=i.filter,s=i.keyup,u=i.keydown,l=i.filterPreventDefault,d=l===void 0?!0:l,f=i.enabled,m=f===void 0?!0:f,g=i.enableOnContentEditable,y=g===void 0?!1:g,v=h.useRef(null),_=h.useCallback(function(x,S){var C,p;return a&&!a(x)?!d:sV(x)&&!sR(x,o)||(C=x.target)!=null&&C.isContentEditable&&!y?!0:v.current===null||document.activeElement===v.current||(p=v.current)!=null&&p.contains(document.activeElement)?(t(x,S),!0):!1},r?[v,o,a].concat(r):[v,o,a]);return h.useEffect(function(){if(!m){zr.unbind(e,_);return}return s&&u!==!0&&(n.keydown=!1),zr(e,n||{},_),function(){return zr.unbind(e,_)}},[_,e,m]),v}zr.isPressed;const lV=(e,t)=>e.filter(n=>n.current).some(n=>{var r;return n.current===t||((r=n.current)==null?void 0:r.contains(t))}),cV=(e,t)=>{e.forEach(n=>window.addEventListener(n,t))},uS=(e,t)=>{e.forEach(n=>window.removeEventListener(n,t))},Wx=(e,t,n=!0,r=["mousedown"])=>{h.useEffect(()=>{const i=o=>{n&&!lV(e,o.target)&&(o.preventDefault(),t(),uS(r,i))};return cV(r,i),()=>{uS(r,i)}},[e,t,n])},ot={edit:Ya("e"),data:Ya("d"),home:Ya("h"),new:Ya("n"),userSettings:Ya("u"),themeSettings:Ya("t"),keyboardShortcuts:"shift+/",search:"/",menu:Ya("m"),sidebarToggle:"\\",moveLineUp:Jv("up"),moveLineDown:Jv("down"),deleteLine:Jv("backspace")};function Ya(e){return navigator.platform.includes("Mac")?`cmd+${e}`:`ctrl+${e}`}function Jv(e){return navigator.platform.includes("Mac")?`option+${e}`:`alt+${e}`}function uV(e){return navigator.platform.includes("Mac")?e.replace("cmd+","⌘").replace("option+","⌥").replace("shift+","⇧").replace("backspace","⌫"):e}function dV({children:e}){const t=xt(),[n]=or(),{sideBarLocked:r,setSideBarLocked:i}=Xe();return Me(ot.edit,o=>{o.preventDefault(),bn.isValidSubject(n)&&t(cg(n))},{},[n]),Me(ot.data,o=>{o.preventDefault(),bn.isValidSubject(n)&&t(q9(n))},{},[n]),Me(ot.home,o=>{o.preventDefault(),t("/")}),Me(ot.new,o=>{o.preventDefault(),t(Fe.new)}),Me(ot.userSettings,o=>{o.preventDefault(),t(Fe.agentSettings)}),Me(ot.themeSettings,o=>{o.preventDefault(),t(Fe.themeSettings)}),Me(ot.keyboardShortcuts,o=>{o.preventDefault(),t(Fe.shortcuts)}),Me(ot.sidebarToggle,o=>{o.preventDefault(),i(!r)},{},[r]),c.jsx(c.Fragment,{children:e})}function lR({shortcut:e,className:t}){const n=uV(e).split("+");return c.jsx(fV,{className:t,children:n.map((r,i)=>c.jsxs(h.Fragment,{children:[c.jsx(pV,{children:r})," ",i<n.length-1&&"+ "]},i))})}const fV=A.span.withConfig({displayName:"Shortcut__Wrapper",componentId:"sc-929032b2-0"})(["font-size:10px;"]),pV=A.kbd.withConfig({displayName:"Shortcut__KBD",componentId:"sc-929032b2-1"})(["display:inline-block;border:"," solid 1px;background-color:",";text-transform:capitalize;border-radius:5px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI Adjusted','Segoe UI','Liberation Sans',sans-serif;padding:0.3em;"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg1),pg=h.createContext(null),hg=(e,t)=>(e%t+t)%t,Vx=h.createContext({locks:new Set,requestLock:()=>{},releaseLock:()=>{}});function hV({children:e}){const[t,n]=h.useState(new Set),r=h.useCallback(a=>{n(s=>new Set([...s,a]))},[]),i=h.useCallback(a=>{t.has(a)&&n(s=>{const u=new Set(s);return u.delete(a),u})},[t]),o=h.useMemo(()=>({locks:t,requestLock:r,releaseLock:i}),[t,r,i]);return c.jsx(Vx.Provider,{value:o,children:e})}function qx(e){const t=h.useId(),{requestLock:n,releaseLock:r}=h.useContext(Vx),i=h.useRef({requestLock:n,releaseLock:r});h.useEffect(()=>{i.current={requestLock:n,releaseLock:r}},[r,n]),h.useEffect(()=>(e?i.current.requestLock(t):i.current.releaseLock(t),()=>{i.current.releaseLock(t)}),[e])}function mV(){const{locks:e}=h.useContext(Vx);return e.size>0}const Zh="divider",Hl=e=>typeof e!="string"&&typeof(e==null?void 0:e.label)=="string",gV=e=>!Hl(e)||e.disabled,vV=e=>e===0?1:Math.sign(e),yV=e=>(t,n)=>{const r=(i,o)=>{const a=hg(i+o,e.length),s=vV(n);return gV(e[a])?r(a,s):a};return r(t,n)};function bV(e){return e.reduce((t,n,r)=>(r===0||r===e.length-1)&&!Hl(n)||!Hl(n)&&!Hl(t[r-1])?t:[...t,n],[])}function mg({items:e,trigger:t,isMainMenu:n,bindActive:r=()=>{}}){var j;const i=h.useId(),o=h.useRef(null),a=h.useRef(null),[s,u]=h.useState(!1);qx(s);const l=h.useCallback(P=>{u(P),r(P)},[r]),d=h.useCallback(()=>{var P;(P=a.current)==null||P.focus(),setTimeout(()=>{l(!1)},100)},[l]);Wx([a,o],d,s,["click","mouseout"]);const f=h.useMemo(()=>bV(e),[e]),[m,g]=h.useState(0),[y,v]=h.useState(0),_=yV(f),[x,S]=h.useState(_(0,0)),[C,p]=h.useState(!0),w=h.useCallback(()=>{if(s){d();return}l(!0),requestAnimationFrame(()=>{if(!a.current||!o.current)return;const P=a.current.getBoundingClientRect(),B=o.current.getBoundingClientRect(),W=P.y-B.height;W<0?v(P.y+P.height/2):v(W+P.height/2),P.x-B.width<0?g(P.x):g(P.x-B.width+P.width),requestAnimationFrame(()=>{o.current.style.visibility="visible"})})},[s,l]),b=h.useCallback(()=>{p(!1)},[]),k=h.useCallback(()=>{p(!0),S(_(0,0)),w()},[w]);Me("esc",d,{enabled:s}),Me("tab",P=>{P.preventDefault(),d()},{enabled:s}),Me(ot.menu,P=>{P.preventDefault(),w(),p(!0)},{enabled:!!n},[s]),Me("enter",P=>{P.preventDefault(),f[x].onClick(),d()},{enabled:s},[x,f]),Me("up",P=>{P.preventDefault(),P.stopPropagation(),p(!0),S(B=>_(B,-1))},{enabled:s},[_]),Me("down",P=>(P.preventDefault(),P.stopPropagation(),p(!0),S(B=>_(B,1)),!1),{enabled:s},[_]);const E=h.useMemo(()=>h.forwardRef(t),[]),I=h.useCallback(()=>{requestAnimationFrame(()=>{o.current&&(o.current.contains(document.activeElement)||d())})},[d]);return c.jsxs(c.Fragment,{children:[c.jsx(E,{ref:a,onClick:k,isActive:s,menuId:i}),s&&c.jsx(wV,{children:c.jsx(jV,{ref:o,isActive:s,x:m,y,id:i,onMouseOver:b,onBlur:I,"aria-labelledby":(j=a.current)==null?void 0:j.id,role:"menu",children:f.map((P,B)=>{if(!Hl(P))return c.jsx(kV,{},B);const{label:W,onClick:D,helper:L,id:T,disabled:V,shortcut:H,icon:q}=P;return c.jsx(xV,{onClick:()=>{d(),D()},id:T,"data-test":`menu-item-${T}`,disabled:V,helper:H?`${L} (${H})`:L,label:W,selected:C&&x===B,icon:q,shortcut:H},T)})})})]})}const wV=({children:e})=>{const t=h.useContext(pg);return t.current?Ln.createPortal(e,t.current):null};function xV({onClick:e,selected:t,helper:n,disabled:r,shortcut:i,icon:o,label:a,...s}){var l;const u=h.useRef(null);return t&&document.activeElement!==u.current&&((l=u.current)==null||l.focus()),c.jsxs(_V,{clean:!0,ref:u,onClick:e,selected:t,title:n,disabled:r,role:"menuitem",tabIndex:-1,...s,children:[o,c.jsx(CV,{children:a}),i&&c.jsx(SV,{shortcut:i})]})}const SV=A(lR).withConfig({displayName:"Dropdown__StyledShortcut",componentId:"sc-1a88d17a-0"})(["margin-left:0.3rem;"]),CV=A.span.withConfig({displayName:"Dropdown__StyledLabel",componentId:"sc-1a88d17a-1"})(["flex:1;"]),_V=A(ue).withConfig({displayName:"Dropdown__MenuItemStyled",componentId:"sc-1a88d17a-2"})(["align-items:center;display:flex;gap:0.5rem;width:100%;text-align:left;color:",";padding:0.4rem 1rem;height:auto;text-transform:capitalize;background-color:",";text-decoration:",";&:hover{background-color:",";}&:active{background-color:",";}&:disabled{color:",";cursor:default;&:hover{cursor:'default';}background-color:",";}svg{color:",";}"],e=>e.theme.colors.text,e=>e.selected?e.theme.colors.bg1:e.theme.colors.bg,e=>e.selected?"underline":"none",e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.bg,e=>e.theme.colors.textLight),kV=A.div.withConfig({displayName:"Dropdown__ItemDivider",componentId:"sc-1a88d17a-3"})(["width:100%;border-bottom:1px solid ",";"],e=>e.theme.colors.bg2),jV=A.div.withConfig({displayName:"Dropdown__Menu",componentId:"sc-1a88d17a-4"})(["visibility:hidden;font-size:0.9rem;overflow:hidden;background:",";border:",";padding-top:0.4rem;padding-bottom:0.4rem;border-radius:8px;position:fixed;z-index:",";top:","px;left:","px;width:auto;box-shadow:",";opacity:",";",";"],e=>e.theme.colors.bg,e=>e.theme.darkMode?`solid 1px ${e.theme.colors.bg2}`:"none",e=>e.theme.zIndex.dropdown,e=>e.y,e=>e.x,e=>e.theme.boxShadowSoft,e=>e.isActive?1:0,Wn("opacity"));function gg(e){const[t,n]=Rs("queryscope"),r=xt(),i=h.useCallback(()=>{const a=new URLSearchParams({queryscope:e??""});r(`/app/search?${a.toString()}`,{replace:!0})},[n,e]),o=h.useCallback(()=>{n(void 0)},[n]);return{scope:t,enableScope:i,clearScope:o}}const EV=(e,t)=>{const n=setTimeout(e,t);return()=>clearTimeout(n)},Kb=({children:e})=>{const t=h.useRef(null);return c.jsxs(pg.Provider,{value:t,children:[e,c.jsx(RV,{ref:t})]})},RV=A.div.withConfig({displayName:"DropdownContainer__DropdownContainerDiv",componentId:"sc-b56ccc3-0"})(["display:contents;"]);function $t(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function PV(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function cR(...e){return t=>e.forEach(n=>PV(n,t))}function Vn(...e){return h.useCallback(cR(...e),e)}function xc(e,t=[]){let n=[];function r(o,a){const s=h.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:m,children:g,...y}=f,v=(m==null?void 0:m[e][u])||s,_=h.useMemo(()=>y,Object.values(y));return h.createElement(v.Provider,{value:_},g)}function d(f,m){const g=(m==null?void 0:m[e][u])||s,y=h.useContext(g);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,d]}const i=()=>{const o=n.map(a=>h.createContext(a));return function(s){const u=(s==null?void 0:s[e])||o;return h.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,AV(i,...t)]}function AV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const wd=h.forwardRef((e,t)=>{const{children:n,...r}=e,i=h.Children.toArray(n),o=i.find(TV);if(o){const a=o.props.children,s=i.map(u=>u===o?h.Children.count(a)>1?h.Children.only(null):h.isValidElement(a)?a.props.children:null:u);return h.createElement(Yb,pe({},r,{ref:t}),h.isValidElement(a)?h.cloneElement(a,void 0,s):null)}return h.createElement(Yb,pe({},r,{ref:t}),n)});wd.displayName="Slot";const Yb=h.forwardRef((e,t)=>{const{children:n,...r}=e;return h.isValidElement(n)?h.cloneElement(n,{...OV(r,n.props),ref:t?cR(t,n.ref):n.ref}):h.Children.count(n)>1?h.Children.only(null):null});Yb.displayName="SlotClone";const IV=({children:e})=>h.createElement(h.Fragment,null,e);function TV(e){return h.isValidElement(e)&&e.type===IV}function OV(e,t){const n={...t};for(const r in t){const i=e[r],o=t[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{...e,...n}}const DV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],wn=DV.reduce((e,t)=>{const n=h.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?wd:t;return h.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),h.createElement(s,pe({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function NV(e,t){e&&Ln.flushSync(()=>e.dispatchEvent(t))}function Fn(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function MV(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e);h.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Xb="dismissableLayer.update",$V="dismissableLayer.pointerDownOutside",LV="dismissableLayer.focusOutside";let dS;const FV=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zV=h.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...l}=e,d=h.useContext(FV),[f,m]=h.useState(null),g=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=h.useState({}),v=Vn(t,E=>m(E)),_=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),S=_.indexOf(x),C=f?_.indexOf(f):-1,p=d.layersWithOutsidePointerEventsDisabled.size>0,w=C>=S,b=BV(E=>{const I=E.target,j=[...d.branches].some(P=>P.contains(I));!w||j||(o==null||o(E),s==null||s(E),E.defaultPrevented||u==null||u())},g),k=HV(E=>{const I=E.target;[...d.branches].some(P=>P.contains(I))||(a==null||a(E),s==null||s(E),E.defaultPrevented||u==null||u())},g);return MV(E=>{C===d.layers.size-1&&(i==null||i(E),!E.defaultPrevented&&u&&(E.preventDefault(),u()))},g),h.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(dS=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),fS(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=dS)}},[f,g,r,d]),h.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),fS())},[f,d]),h.useEffect(()=>{const E=()=>y({});return document.addEventListener(Xb,E),()=>document.removeEventListener(Xb,E)},[]),h.createElement(wn.div,pe({},l,{ref:v,style:{pointerEvents:p?w?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,k.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,b.onPointerDownCapture)}))});function BV(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){uR($V,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function HV(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=h.useRef(!1);return h.useEffect(()=>{const i=o=>{o.target&&!r.current&&uR(LV,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fS(){const e=new CustomEvent(Xb);document.dispatchEvent(e)}function uR(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?NV(i,o):i.dispatchEvent(o)}let Zv=0;function UV(){h.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:pS()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:pS()),Zv++,()=>{Zv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Zv--}},[])}function pS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const e1="focusScope.autoFocusOnMount",t1="focusScope.autoFocusOnUnmount",hS={bubbles:!1,cancelable:!0},WV=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=h.useState(null),l=Fn(i),d=Fn(o),f=h.useRef(null),m=Vn(t,v=>u(v)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let v=function(C){if(g.paused||!s)return;const p=C.target;s.contains(p)?f.current=p:ea(f.current,{select:!0})},_=function(C){if(g.paused||!s)return;const p=C.relatedTarget;p!==null&&(s.contains(p)||ea(f.current,{select:!0}))},x=function(C){const p=document.activeElement;for(const w of C)w.removedNodes.length>0&&(s!=null&&s.contains(p)||ea(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const S=new MutationObserver(x);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),S.disconnect()}}},[r,s,g.paused]),h.useEffect(()=>{if(s){gS.add(g);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(e1,hS);s.addEventListener(e1,l),s.dispatchEvent(x),x.defaultPrevented||(VV(XV(dR(s)),{select:!0}),document.activeElement===v&&ea(s))}return()=>{s.removeEventListener(e1,l),setTimeout(()=>{const x=new CustomEvent(t1,hS);s.addEventListener(t1,d),s.dispatchEvent(x),x.defaultPrevented||ea(v??document.body,{select:!0}),s.removeEventListener(t1,d),gS.remove(g)},0)}}},[s,l,d,g]);const y=h.useCallback(v=>{if(!n&&!r||g.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const S=v.currentTarget,[C,p]=qV(S);C&&p?!v.shiftKey&&x===p?(v.preventDefault(),n&&ea(C,{select:!0})):v.shiftKey&&x===C&&(v.preventDefault(),n&&ea(p,{select:!0})):x===S&&v.preventDefault()}},[n,r,g.paused]);return h.createElement(wn.div,pe({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function VV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ea(r,{select:t}),document.activeElement!==n)return}function qV(e){const t=dR(e),n=mS(t,e),r=mS(t.reverse(),e);return[n,r]}function dR(e){const t=[],n=document.createTreeWalker(e,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();)t.push(n.currentNode);return t}function mS(e,t){for(const n of e)if(!GV(n,{upTo:t}))return n}function GV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function KV(e){return e instanceof HTMLInputElement&&"select"in e}function ea(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&KV(e)&&t&&e.select()}}const gS=YV();function YV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=vS(e,t),e.unshift(t)},remove(t){var n;e=vS(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function vS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function XV(e){return e.filter(t=>t.tagName!=="A")}const Ps=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},QV=n7.useId||(()=>{});let JV=0;function Gx(e){const[t,n]=h.useState(QV());return Ps(()=>{e||n(r=>r??String(JV++))},[e]),e||(t?`radix-${t}`:"")}const ZV=["top","right","bottom","left"],Ia=Math.min,Lr=Math.max,em=Math.round,Wf=Math.floor,Ta=e=>({x:e,y:e}),eq={left:"right",right:"left",bottom:"top",top:"bottom"},tq={start:"end",end:"start"};function Qb(e,t,n){return Lr(e,Ia(t,n))}function Oo(e,t){return typeof e=="function"?e(t):e}function Do(e){return e.split("-")[0]}function Sc(e){return e.split("-")[1]}function Kx(e){return e==="x"?"y":"x"}function Yx(e){return e==="y"?"height":"width"}function Cc(e){return["top","bottom"].includes(Do(e))?"y":"x"}function Xx(e){return Kx(Cc(e))}function nq(e,t,n){n===void 0&&(n=!1);const r=Sc(e),i=Xx(e),o=Yx(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=tm(a)),[a,tm(a)]}function rq(e){const t=tm(e);return[Jb(e),t,Jb(t)]}function Jb(e){return e.replace(/start|end/g,t=>tq[t])}function iq(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function oq(e,t,n,r){const i=Sc(e);let o=iq(Do(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Jb)))),o}function tm(e){return e.replace(/left|right|bottom|top/g,t=>eq[t])}function aq(e){return{top:0,right:0,bottom:0,left:0,...e}}function fR(e){return typeof e!="number"?aq(e):{top:e,right:e,bottom:e,left:e}}function nm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function yS(e,t,n){let{reference:r,floating:i}=e;const o=Cc(t),a=Xx(t),s=Yx(a),u=Do(t),l=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let g;switch(u){case"top":g={x:d,y:r.y-i.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-i.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Sc(t)){case"start":g[a]-=m*(n&&l?-1:1);break;case"end":g[a]+=m*(n&&l?-1:1);break}return g}const sq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=yS(l,r,u),m=r,g={},y=0;for(let v=0;v<s.length;v++){const{name:_,fn:x}=s[v],{x:S,y:C,data:p,reset:w}=await x({x:d,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:l,platform:a,elements:{reference:e,floating:t}});if(d=S??d,f=C??f,g={...g,[_]:{...g[_],...p}},w&&y<=50){y++,typeof w=="object"&&(w.placement&&(m=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:d,y:f}=yS(l,m,u)),v=-1;continue}}return{x:d,y:f,placement:m,strategy:i,middlewareData:g}};async function xd(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=Oo(t,e),y=fR(g),_=s[m?f==="floating"?"reference":"floating":f],x=nm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(_)))==null||n?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:u})),S=f==="floating"?{...a.floating,x:r,y:i}:a.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),p=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},w=nm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:S,offsetParent:C,strategy:u}):S);return{top:(x.top-w.top+y.top)/p.y,bottom:(w.bottom-x.bottom+y.bottom)/p.y,left:(x.left-w.left+y.left)/p.x,right:(w.right-x.right+y.right)/p.x}}const bS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s}=t,{element:u,padding:l=0}=Oo(e,t)||{};if(u==null)return{};const d=fR(l),f={x:n,y:r},m=Xx(i),g=Yx(m),y=await a.getDimensions(u),v=m==="y",_=v?"top":"left",x=v?"bottom":"right",S=v?"clientHeight":"clientWidth",C=o.reference[g]+o.reference[m]-f[m]-o.floating[g],p=f[m]-o.reference[m],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let b=w?w[S]:0;(!b||!await(a.isElement==null?void 0:a.isElement(w)))&&(b=s.floating[S]||o.floating[g]);const k=C/2-p/2,E=b/2-y[g]/2-1,I=Ia(d[_],E),j=Ia(d[x],E),P=I,B=b-y[g]-j,W=b/2-y[g]/2+k,D=Qb(P,W,B),T=Sc(i)!=null&&W!=D&&o.reference[g]/2-(W<P?I:j)-y[g]/2<0?W<P?P-W:B-W:0;return{[m]:f[m]-T,data:{[m]:D,centerOffset:W-D+T}}}}),lq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=Oo(e,t),_=Do(r),x=Do(a)===a,S=await(s.isRTL==null?void 0:s.isRTL(u.floating)),C=f||(x||!y?[tm(a)]:rq(a));!f&&g!=="none"&&C.push(...oq(a,y,g,S));const p=[a,...C],w=await xd(t,v),b=[];let k=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&b.push(w[_]),d){const P=nq(r,o,S);b.push(w[P[0]],w[P[1]])}if(k=[...k,{placement:r,overflows:b}],!b.every(P=>P<=0)){var E,I;const P=(((E=i.flip)==null?void 0:E.index)||0)+1,B=p[P];if(B)return{data:{index:P,overflows:k},reset:{placement:B}};let W=(I=k.filter(D=>D.overflows[0]<=0).sort((D,L)=>D.overflows[1]-L.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(m){case"bestFit":{var j;const D=(j=k.map(L=>[L.placement,L.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((L,T)=>L[1]-T[1])[0])==null?void 0:j[0];D&&(W=D);break}case"initialPlacement":W=a;break}if(r!==W)return{reset:{placement:W}}}return{}}}};function wS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xS(e){return ZV.some(t=>e[t]>=0)}const cq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Oo(e,t);switch(r){case"referenceHidden":{const o=await xd(t,{...i,elementContext:"reference"}),a=wS(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:xS(a)}}}case"escaped":{const o=await xd(t,{...i,altBoundary:!0}),a=wS(o,n.floating);return{data:{escapedOffsets:a,escaped:xS(a)}}}default:return{}}}}};async function uq(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Do(n),s=Sc(n),u=Cc(n)==="y",l=["left","top"].includes(a)?-1:1,d=o&&u?-1:1,f=Oo(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof y=="number"&&(g=s==="end"?y*-1:y),u?{x:g*d,y:m*l}:{x:m*l,y:g*d}}const dq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await uq(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},fq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x,y:S}=_;return{x,y:S}}},...u}=Oo(e,t),l={x:n,y:r},d=await xd(t,u),f=Cc(Do(i)),m=Kx(f);let g=l[m],y=l[f];if(o){const _=m==="y"?"top":"left",x=m==="y"?"bottom":"right",S=g+d[_],C=g-d[x];g=Qb(S,g,C)}if(a){const _=f==="y"?"top":"left",x=f==="y"?"bottom":"right",S=y+d[_],C=y-d[x];y=Qb(S,y,C)}const v=s.fn({...t,[m]:g,[f]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},pq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Oo(e,t),d={x:n,y:r},f=Cc(i),m=Kx(f);let g=d[m],y=d[f];const v=Oo(s,t),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const C=m==="y"?"height":"width",p=o.reference[m]-o.floating[C]+_.mainAxis,w=o.reference[m]+o.reference[C]-_.mainAxis;g<p?g=p:g>w&&(g=w)}if(l){var x,S;const C=m==="y"?"width":"height",p=["top","left"].includes(Do(i)),w=o.reference[f]-o.floating[C]+(p&&((x=a.offset)==null?void 0:x[f])||0)+(p?0:_.crossAxis),b=o.reference[f]+o.reference[C]+(p?0:((S=a.offset)==null?void 0:S[f])||0)-(p?_.crossAxis:0);y<w?y=w:y>b&&(y=b)}return{[m]:g,[f]:y}}}},hq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=Oo(e,t),u=await xd(t,s),l=Do(n),d=Sc(n),f=Cc(n)==="y",{width:m,height:g}=r.floating;let y,v;l==="top"||l==="bottom"?(y=l,v=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,y=d==="end"?"top":"bottom");const _=g-u[y],x=m-u[v],S=!t.middlewareData.shift;let C=_,p=x;if(f){const b=m-u.left-u.right;p=d||S?Ia(x,b):b}else{const b=g-u.top-u.bottom;C=d||S?Ia(_,b):b}if(S&&!d){const b=Lr(u.left,0),k=Lr(u.right,0),E=Lr(u.top,0),I=Lr(u.bottom,0);f?p=m-2*(b!==0||k!==0?b+k:Lr(u.left,u.right)):C=g-2*(E!==0||I!==0?E+I:Lr(u.top,u.bottom))}await a({...t,availableWidth:p,availableHeight:C});const w=await i.getDimensions(o.floating);return m!==w.width||g!==w.height?{reset:{rects:!0}}:{}}}};function Oa(e){return pR(e)?(e.nodeName||"").toLowerCase():"#document"}function Hr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lo(e){var t;return(t=(pR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pR(e){return e instanceof Node||e instanceof Hr(e).Node}function No(e){return e instanceof Element||e instanceof Hr(e).Element}function so(e){return e instanceof HTMLElement||e instanceof Hr(e).HTMLElement}function SS(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hr(e).ShadowRoot}function tf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function mq(e){return["table","td","th"].includes(Oa(e))}function Qx(e){const t=Jx(),n=vi(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function gq(e){let t=ac(e);for(;so(t)&&!vg(t);){if(Qx(t))return t;t=ac(t)}return null}function Jx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vg(e){return["html","body","#document"].includes(Oa(e))}function vi(e){return Hr(e).getComputedStyle(e)}function yg(e){return No(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ac(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||SS(e)&&e.host||Lo(e);return SS(t)?t.host:t}function hR(e){const t=ac(e);return vg(t)?e.ownerDocument?e.ownerDocument.body:e.body:so(t)&&tf(t)?t:hR(t)}function rm(e,t){var n;t===void 0&&(t=[]);const r=hR(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Hr(r);return i?t.concat(o,o.visualViewport||[],tf(r)?r:[]):t.concat(r,rm(r))}function mR(e){const t=vi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=so(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=em(n)!==o||em(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Zx(e){return No(e)?e:e.contextElement}function Ul(e){const t=Zx(e);if(!so(t))return Ta(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=mR(t);let a=(o?em(n.width):n.width)/r,s=(o?em(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const vq=Ta(0);function gR(e){const t=Hr(e);return!Jx()||!t.visualViewport?vq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hr(e)?!1:t}function As(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Zx(e);let a=Ta(1);t&&(r?No(r)&&(a=Ul(r)):a=Ul(e));const s=yq(o,n,r)?gR(o):Ta(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const m=Hr(o),g=r&&No(r)?Hr(r):r;let y=m.frameElement;for(;y&&r&&g!==m;){const v=Ul(y),_=y.getBoundingClientRect(),x=vi(y),S=_.left+(y.clientLeft+parseFloat(x.paddingLeft))*v.x,C=_.top+(y.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,l*=v.y,d*=v.x,f*=v.y,u+=S,l+=C,y=Hr(y).frameElement}}return nm({width:d,height:f,x:u,y:l})}function bq(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=so(n),o=Lo(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s=Ta(1);const u=Ta(0);if((i||!i&&r!=="fixed")&&((Oa(n)!=="body"||tf(o))&&(a=yg(n)),so(n))){const l=As(n);s=Ul(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}}function wq(e){return Array.from(e.getClientRects())}function vR(e){return As(Lo(e)).left+yg(e).scrollLeft}function xq(e){const t=Lo(e),n=yg(e),r=e.ownerDocument.body,i=Lr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Lr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+vR(e);const s=-n.scrollTop;return vi(r).direction==="rtl"&&(a+=Lr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function Sq(e,t){const n=Hr(e),r=Lo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=Jx();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function Cq(e,t){const n=As(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=so(e)?Ul(e):Ta(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function CS(e,t,n){let r;if(t==="viewport")r=Sq(e,n);else if(t==="document")r=xq(Lo(e));else if(No(t))r=Cq(t,n);else{const i=gR(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return nm(r)}function yR(e,t){const n=ac(e);return n===t||!No(n)||vg(n)?!1:vi(n).position==="fixed"||yR(n,t)}function _q(e,t){const n=t.get(e);if(n)return n;let r=rm(e).filter(s=>No(s)&&Oa(s)!=="body"),i=null;const o=vi(e).position==="fixed";let a=o?ac(e):e;for(;No(a)&&!vg(a);){const s=vi(a),u=Qx(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||tf(a)&&!u&&yR(e,a))?r=r.filter(d=>d!==a):i=s,a=ac(a)}return t.set(e,r),r}function kq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?_q(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,d)=>{const f=CS(t,d,i);return l.top=Lr(f.top,l.top),l.right=Ia(f.right,l.right),l.bottom=Ia(f.bottom,l.bottom),l.left=Lr(f.left,l.left),l},CS(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function jq(e){return mR(e)}function Eq(e,t,n){const r=so(t),i=Lo(t),o=n==="fixed",a=As(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Ta(0);if(r||!r&&!o)if((Oa(t)!=="body"||tf(i))&&(s=yg(t)),r){const l=As(t,!0,o,t);u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}else i&&(u.x=vR(i));return{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function _S(e,t){return!so(e)||vi(e).position==="fixed"?null:t?t(e):e.offsetParent}function bR(e,t){const n=Hr(e);if(!so(e))return n;let r=_S(e,t);for(;r&&mq(r)&&vi(r).position==="static";)r=_S(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&vi(r).position==="static"&&!Qx(r))?n:r||gq(e)||n}const Rq=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||bR,o=this.getDimensions;return{reference:Eq(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function Pq(e){return vi(e).direction==="rtl"}const Aq={convertOffsetParentRelativeRectToViewportRelativeRect:bq,getDocumentElement:Lo,getClippingRect:kq,getOffsetParent:bR,getElementRects:Rq,getClientRects:wq,getDimensions:jq,getScale:Ul,isElement:No,isRTL:Pq};function Iq(e,t){let n=null,r;const i=Lo(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:d,width:f,height:m}=e.getBoundingClientRect();if(s||t(),!f||!m)return;const g=Wf(d),y=Wf(i.clientWidth-(l+f)),v=Wf(i.clientHeight-(d+m)),_=Wf(l),S={rootMargin:-g+"px "+-y+"px "+-v+"px "+-_+"px",threshold:Lr(0,Ia(1,u))||1};let C=!0;function p(w){const b=w[0].intersectionRatio;if(b!==u){if(!C)return a();b?a(!1,b):r=setTimeout(()=>{a(!1,1e-7)},100)}C=!1}try{n=new IntersectionObserver(p,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(p,S)}n.observe(e)}return a(!0),o}function Tq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Zx(e),d=i||o?[...l?rm(l):[],...rm(t)]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const f=l&&s?Iq(l,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[S]=x;S&&S.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{g&&g.observe(t)})),n()}),l&&!u&&g.observe(l),g.observe(t));let y,v=u?As(e):null;u&&_();function _(){const x=As(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,y=requestAnimationFrame(_)}return n(),()=>{d.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f&&f(),g&&g.disconnect(),g=null,u&&cancelAnimationFrame(y)}}const Oq=(e,t,n)=>{const r=new Map,i={platform:Aq,...n},o={...i.platform,_c:r};return sq(e,t,{...i,platform:o})},Dq=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?bS({element:r.current,padding:i}).fn(n):{}:r?bS({element:r,padding:i}).fn(n):{}}}};var Jp=typeof document<"u"?h.useLayoutEffect:h.useEffect;function im(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!im(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!im(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function wR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kS(e,t){const n=wR(e);return Math.round(t*n)/n}function jS(e){const t=h.useRef(e);return Jp(()=>{t.current=e}),t}function Nq(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=h.useState(r);im(m,r)||g(r);const[y,v]=h.useState(null),[_,x]=h.useState(null),S=h.useCallback(T=>{T!=b.current&&(b.current=T,v(T))},[v]),C=h.useCallback(T=>{T!==k.current&&(k.current=T,x(T))},[x]),p=o||y,w=a||_,b=h.useRef(null),k=h.useRef(null),E=h.useRef(d),I=jS(u),j=jS(i),P=h.useCallback(()=>{if(!b.current||!k.current)return;const T={placement:t,strategy:n,middleware:m};j.current&&(T.platform=j.current),Oq(b.current,k.current,T).then(V=>{const H={...V,isPositioned:!0};B.current&&!im(E.current,H)&&(E.current=H,Ln.flushSync(()=>{f(H)}))})},[m,t,n,j]);Jp(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[l]);const B=h.useRef(!1);Jp(()=>(B.current=!0,()=>{B.current=!1}),[]),Jp(()=>{if(p&&(b.current=p),w&&(k.current=w),p&&w){if(I.current)return I.current(p,w,P);P()}},[p,w,P,I]);const W=h.useMemo(()=>({reference:b,floating:k,setReference:S,setFloating:C}),[S,C]),D=h.useMemo(()=>({reference:p,floating:w}),[p,w]),L=h.useMemo(()=>{const T={position:n,left:0,top:0};if(!D.floating)return T;const V=kS(D.floating,d.x),H=kS(D.floating,d.y);return s?{...T,transform:"translate("+V+"px, "+H+"px)",...wR(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:H}},[n,s,D.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:P,refs:W,elements:D,floatingStyles:L}),[d,P,W,D,L])}const Mq=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return h.createElement(wn.svg,pe({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:h.createElement("polygon",{points:"0,0 30,0 15,10"}))}),$q=Mq;function Lq(e){const[t,n]=h.useState(void 0);return Ps(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const xR="Popper",[SR,CR]=xc(xR),[Fq,_R]=SR(xR),zq=e=>{const{__scopePopper:t,children:n}=e,[r,i]=h.useState(null);return h.createElement(Fq,{scope:t,anchor:r,onAnchorChange:i},n)},Bq="PopperAnchor",Hq=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=_R(Bq,n),a=h.useRef(null),s=Vn(t,a);return h.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.createElement(wn.div,pe({},i,{ref:s}))}),kR="PopperContent",[Uq,Wq]=SR(kR),Vq=h.forwardRef((e,t)=>{var n,r,i,o,a,s,u,l;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:g="center",alignOffset:y=0,arrowPadding:v=0,collisionBoundary:_=[],collisionPadding:x=0,sticky:S="partial",hideWhenDetached:C=!1,avoidCollisions:p=!0,onPlaced:w,...b}=e,k=_R(kR,d),[E,I]=h.useState(null),j=Vn(t,Tt=>I(Tt)),[P,B]=h.useState(null),W=Lq(P),D=(n=W==null?void 0:W.width)!==null&&n!==void 0?n:0,L=(r=W==null?void 0:W.height)!==null&&r!==void 0?r:0,T=f+(g!=="center"?"-"+g:""),V=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},H=Array.isArray(_)?_:[_],q=H.length>0,N={padding:V,boundary:H.filter(Yq),altBoundary:q},{refs:J,floatingStyles:se,placement:z,isPositioned:Ce,middlewareData:Ee}=Nq({strategy:"fixed",placement:T,whileElementsMounted:Tq,elements:{reference:k.anchor},middleware:[dq({mainAxis:m+L,alignmentAxis:y}),p&&fq({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?pq():void 0,...N}),p&&lq({...N}),hq({...N,apply:({elements:Tt,rects:Bt,availableWidth:Sn,availableHeight:un})=>{const{width:_i,height:Zr}=Bt.reference,Vt=Tt.floating.style;Vt.setProperty("--radix-popper-available-width",`${Sn}px`),Vt.setProperty("--radix-popper-available-height",`${un}px`),Vt.setProperty("--radix-popper-anchor-width",`${_i}px`),Vt.setProperty("--radix-popper-anchor-height",`${Zr}px`)}}),P&&Dq({element:P,padding:v}),Xq({arrowWidth:D,arrowHeight:L}),C&&cq({strategy:"referenceHidden"})]}),[ye,Re]=jR(z),Oe=Fn(w);Ps(()=>{Ce&&(Oe==null||Oe())},[Ce,Oe]);const rt=(i=Ee.arrow)===null||i===void 0?void 0:i.x,Pe=(o=Ee.arrow)===null||o===void 0?void 0:o.y,zt=((a=Ee.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[dt,tn]=h.useState();return Ps(()=>{E&&tn(window.getComputedStyle(E).zIndex)},[E]),h.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:Ce?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:dt,"--radix-popper-transform-origin":[(s=Ee.transformOrigin)===null||s===void 0?void 0:s.x,(u=Ee.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},h.createElement(Uq,{scope:d,placedSide:ye,onArrowChange:B,arrowX:rt,arrowY:Pe,shouldHideArrow:zt},h.createElement(wn.div,pe({"data-side":ye,"data-align":Re},b,{ref:j,style:{...b.style,animation:Ce?void 0:"none",opacity:(l=Ee.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),qq="PopperArrow",Gq={top:"bottom",right:"left",bottom:"top",left:"right"},Kq=h.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Wq(qq,r),a=Gq[o.placedSide];return h.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},h.createElement($q,pe({},i,{ref:n,style:{...i.style,display:"block"}})))});function Yq(e){return e!==null}const Xq=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:u,middlewareData:l}=t,f=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[y,v]=jR(s),_={start:"0%",center:"50%",end:"100%"}[v],x=((r=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,S=((o=(a=l.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+g/2;let C="",p="";return y==="bottom"?(C=f?_:`${x}px`,p=`${-g}px`):y==="top"?(C=f?_:`${x}px`,p=`${u.floating.height+g}px`):y==="right"?(C=`${-g}px`,p=f?_:`${S}px`):y==="left"&&(C=`${u.floating.width+g}px`,p=f?_:`${S}px`),{data:{x:C,y:p}}}});function jR(e){const[t,n="center"]=e.split("-");return[t,n]}const Qq=zq,ER=Hq,Jq=Vq,Zq=Kq,eG=h.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?D$.createPortal(h.createElement(wn.div,pe({},i,{ref:t})),r):null});function tG(e,t){return h.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Wa=e=>{const{present:t,children:n}=e,r=nG(t),i=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Vn(r.ref,i.ref);return typeof n=="function"||r.isPresent?h.cloneElement(i,{ref:o}):null};Wa.displayName="Presence";function nG(e){const[t,n]=h.useState(),r=h.useRef({}),i=h.useRef(e),o=h.useRef("none"),a=e?"mounted":"unmounted",[s,u]=tG(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const l=Vf(r.current);o.current=s==="mounted"?l:"none"},[s]),Ps(()=>{const l=r.current,d=i.current;if(d!==e){const m=o.current,g=Vf(l);e?u("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Ps(()=>{if(t){const l=f=>{const g=Vf(r.current).includes(f.animationName);f.target===t&&g&&Ln.flushSync(()=>u("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Vf(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:h.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vf(e){return(e==null?void 0:e.animationName)||"none"}function e3({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=rG({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Fn(n),u=h.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function rG({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,i=h.useRef(r),o=Fn(t);return h.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var iG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ll=new WeakMap,qf=new WeakMap,Gf={},n1=0,RR=function(e){return e&&(e.host||RR(e.parentNode))},oG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=RR(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},aG=function(e,t,n,r){var i=oG(t,Array.isArray(e)?e:[e]);Gf[n]||(Gf[n]=new WeakMap);var o=Gf[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(m){if(s.has(m))d(m);else{var g=m.getAttribute(r),y=g!==null&&g!=="false",v=(ll.get(m)||0)+1,_=(o.get(m)||0)+1;ll.set(m,v),o.set(m,_),a.push(m),v===1&&y&&qf.set(m,!0),_===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return d(t),s.clear(),n1++,function(){a.forEach(function(f){var m=ll.get(f)-1,g=o.get(f)-1;ll.set(f,m),o.set(f,g),m||(qf.has(f)||f.removeAttribute(r),qf.delete(f)),g||f.removeAttribute(n)}),n1--,n1||(ll=new WeakMap,ll=new WeakMap,qf=new WeakMap,Gf={})}},sG=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||iG(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),aG(r,i,n,"aria-hidden")):function(){return null}},Zp="right-scroll-bar-position",eh="width-before-scroll-bar",lG="with-scroll-bars-hidden",cG="--removed-body-scroll-bar-size";function uG(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dG(e,t){var n=h.useState(function(){return{value:e,callback:t,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=t,n.facade}function fG(e,t){return dG(t||null,function(n){return e.forEach(function(r){return uG(r,n)})})}function pG(e){return e}function hG(e,t){t===void 0&&(t=pG);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]:e},useMedium:function(o){var a=t(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 u=function(){var d=a;a=[],d.forEach(o)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(d){a.push(d),l()},filter:function(d){return a=a.filter(d),n}}}};return i}function mG(e){e===void 0&&(e={});var t=hG(null);return t.options=bt({async:!0,ssr:!1},e),t}var PR=function(e){var t=e.sideCar,n=r9(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,bt({},n))};PR.isSideCarExport=!0;function gG(e,t){return e.useMedium(t),PR}var AR=mG(),r1=function(){},bg=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:r1,onWheelCapture:r1,onTouchMoveCapture:r1}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,g=e.noIsolation,y=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,S=r9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),C=m,p=fG([n,t]),w=bt(bt({},S),i);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:AR,removeScrollBar:l,shards:f,noIsolation:g,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?h.cloneElement(h.Children.only(s),bt(bt({},w),{ref:p})):h.createElement(x,bt({},w,{className:u,ref:p}),s))});bg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bg.classNames={fullWidth:eh,zeroRight:Zp};var ES,vG=function(){if(ES)return ES;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vG();return t&&e.setAttribute("nonce",t),e}function bG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yG())&&(bG(t,n),wG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},SG=function(){var e=xG();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},IR=function(){var e=SG(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},CG={left:0,top:0,right:0,gap:0},i1=function(e){return parseInt(e||"",10)||0},_G=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[i1(n),i1(r),i1(i)]},kG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return CG;var t=_G(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jG=IR(),EG=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(lG,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Zp,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(eh,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(Zp," .").concat(Zp,` {
right: 0 `).concat(r,`;
}
.`).concat(eh," .").concat(eh,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(cG,": ").concat(s,`px;
}
`)},RG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=h.useMemo(function(){return kG(i)},[i]);return h.createElement(jG,{styles:EG(o,!t,i,n?"":"!important")})},Zb=!1;if(typeof window<"u")try{var Kf=Object.defineProperty({},"passive",{get:function(){return Zb=!0,!0}});window.addEventListener("test",Kf,Kf),window.removeEventListener("test",Kf,Kf)}catch{Zb=!1}var cl=Zb?{passive:!1}:!1,PG=function(e){return e.tagName==="TEXTAREA"},TR=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!PG(e)&&n[t]==="visible")},AG=function(e){return TR(e,"overflowY")},IG=function(e){return TR(e,"overflowX")},RS=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=OR(e,n);if(r){var i=DR(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},TG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},OG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},OR=function(e,t){return e==="v"?AG(t):IG(t)},DR=function(e,t){return e==="v"?TG(t):OG(t)},DG=function(e,t){return e==="h"&&t==="rtl"?-1:1},NG=function(e,t,n,r,i){var o=DG(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,d=a>0,f=0,m=0;do{var g=DR(e,s),y=g[0],v=g[1],_=g[2],x=v-_-o*y;(y||x)&&OR(e,s)&&(f+=x,m+=y),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(i&&f===0||!i&&a>f)||!d&&(i&&m===0||!i&&-a>m))&&(l=!0),l},Yf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},PS=function(e){return[e.deltaX,e.deltaY]},AS=function(e){return e&&"current"in e?e.current:e},MG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$G=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},LG=0,ul=[];function FG(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),i=h.useState(LG++)[0],o=h.useState(function(){return IR()})[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=ks([e.lockRef.current],(e.shards||[]).map(AS),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=h.useCallback(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=Yf(v),S=n.current,C="deltaX"in v?v.deltaX:S[0]-x[0],p="deltaY"in v?v.deltaY:S[1]-x[1],w,b=v.target,k=Math.abs(C)>Math.abs(p)?"h":"v";if("touches"in v&&k==="h"&&b.type==="range")return!1;var E=RS(k,b);if(!E)return!0;if(E?w=k:(w=k==="v"?"h":"v",E=RS(k,b)),!E)return!1;if(!r.current&&"changedTouches"in v&&(C||p)&&(r.current=w),!w)return!0;var I=r.current||w;return NG(I,_,v,I==="h"?C:p,!0)},[]),u=h.useCallback(function(v){var _=v;if(!(!ul.length||ul[ul.length-1]!==o)){var x="deltaY"in _?PS(_):Yf(_),S=t.current.filter(function(w){return w.name===_.type&&w.target===_.target&&MG(w.delta,x)})[0];if(S&&S.should){_.cancelable&&_.preventDefault();return}if(!S){var C=(a.current.shards||[]).map(AS).filter(Boolean).filter(function(w){return w.contains(_.target)}),p=C.length>0?s(_,C[0]):!a.current.noIsolation;p&&_.cancelable&&_.preventDefault()}}},[]),l=h.useCallback(function(v,_,x,S){var C={name:v,delta:_,target:x,should:S};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(p){return p!==C})},1)},[]),d=h.useCallback(function(v){n.current=Yf(v),r.current=void 0},[]),f=h.useCallback(function(v){l(v.type,PS(v),v.target,s(v,e.lockRef.current))},[]),m=h.useCallback(function(v){l(v.type,Yf(v),v.target,s(v,e.lockRef.current))},[]);h.useEffect(function(){return ul.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",u,cl),document.addEventListener("touchmove",u,cl),document.addEventListener("touchstart",d,cl),function(){ul=ul.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,cl),document.removeEventListener("touchmove",u,cl),document.removeEventListener("touchstart",d,cl)}},[]);var g=e.removeScrollBar,y=e.inert;return h.createElement(h.Fragment,null,y?h.createElement(o,{styles:$G(i)}):null,g?h.createElement(RG,{gapMode:"margin"}):null)}const zG=gG(AR,FG);var NR=h.forwardRef(function(e,t){return h.createElement(bg,bt({},e,{ref:t,sideCar:zG}))});NR.classNames=bg.classNames;const BG=NR,MR="Popover",[$R,xxe]=xc(MR,[CR]),nf=CR(),[HG,zs]=$R(MR),UG=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=nf(t),u=h.useRef(null),[l,d]=h.useState(!1),[f=!1,m]=e3({prop:r,defaultProp:i,onChange:o});return h.createElement(Qq,s,h.createElement(HG,{scope:t,contentId:Gx(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:l,onCustomAnchorAdd:h.useCallback(()=>d(!0),[]),onCustomAnchorRemove:h.useCallback(()=>d(!1),[]),modal:a},n))},WG="PopoverAnchor",VG=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=zs(WG,n),o=nf(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return h.useEffect(()=>(a(),()=>s()),[a,s]),h.createElement(ER,pe({},o,r,{ref:t}))}),qG="PopoverTrigger",GG=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=zs(qG,n),o=nf(n),a=Vn(t,i.triggerRef),s=h.createElement(wn.button,pe({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zR(i.open)},r,{ref:a,onClick:$t(e.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?s:h.createElement(ER,pe({asChild:!0},o),s)}),LR="PopoverPortal",[KG,YG]=$R(LR,{forceMount:void 0}),XG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=zs(LR,t);return h.createElement(KG,{scope:t,forceMount:n},h.createElement(Wa,{present:n||o.open},h.createElement(eG,{asChild:!0,container:i},r)))},Sd="PopoverContent",QG=h.forwardRef((e,t)=>{const n=YG(Sd,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=zs(Sd,e.__scopePopover);return h.createElement(Wa,{present:r||o.open},o.modal?h.createElement(JG,pe({},i,{ref:t})):h.createElement(ZG,pe({},i,{ref:t})))}),JG=h.forwardRef((e,t)=>{const n=zs(Sd,e.__scopePopover),r=h.useRef(null),i=Vn(t,r),o=h.useRef(!1);return h.useEffect(()=>{const a=r.current;if(a)return sG(a)},[]),h.createElement(BG,{as:wd,allowPinchZoom:!0},h.createElement(FR,pe({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),o.current||(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:$t(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),ZG=h.forwardRef((e,t)=>{const n=zs(Sd,e.__scopePopover),r=h.useRef(!1),i=h.useRef(!1);return h.createElement(FR,pe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,o),!o.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=o.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),FR=h.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,...f}=e,m=zs(Sd,n),g=nf(n);return UV(),h.createElement(WV,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},h.createElement(zV,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1)},h.createElement(Jq,pe({"data-state":zR(m.open),role:"dialog",id:m.contentId},g,f,{ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}),eK=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=nf(n);return h.createElement(Zq,pe({},i,r,{ref:t}))});function zR(e){return e?"open":"closed"}const t3=UG,BR=VG,wg=GG,n3=XG,r3=QG,tK=eK,i3=h.createContext(null),HR=h.createContext({inDialog:!1,hasOpenInnerPopup:!1,setHasOpenInnerPopup:()=>{}}),nK=({children:e})=>{const[t,n]=h.useState(!1),r=h.useMemo(()=>({inDialog:!0,hasOpenInnerPopup:t,setHasOpenInnerPopup:n}),[t]);return c.jsx(HR.Provider,{value:r,children:e})};function o3(){return h.useContext(HR)}function a3({children:e,className:t,open:n,defaultOpen:r,noArrow:i,noLock:o,onOpenChange:a,Trigger:s}){const{setHasOpenInnerPopup:u}=o3(),d=h.useContext(UR).current??void 0;qx(!o&&!!n);const f=h.useCallback(m=>{u(m),a(m)},[a,u]);return h.useEffect(()=>{u(!!n)},[n,u]),c.jsxs(t3,{modal:!0,open:n,onOpenChange:f,defaultOpen:r,children:[s,c.jsx(n3,{container:d,children:c.jsxs(rK,{collisionPadding:10,sticky:"always",className:t,children:[e,!i&&c.jsx(iK,{})]})})]})}const IS=$o(["from{opacity:0;transform:scale(0);}to{opacity:1;transform:scale(1);}"]);A(wg).withConfig({displayName:"Popover__DefaultTrigger",componentId:"sc-25cfb5b1-0"})(["max-width:100%;"]);const rK=A(r3).withConfig({displayName:"Popover__Content",componentId:"sc-25cfb5b1-1"})(["--popover-close-offset:","rem;--popover-close-size:25px;--popover-close-safe-area:calc( var(--popover-close-size) + (var(--popover-close-offset) * 2) - ","rem );background-color:",";backdrop-filter:blur(10px);box-shadow:",";border-radius:",";position:relative;z-index:10000000;animation:"," 0.1s ease-in-out;&[data-state='closed']{animation:"," 0.1s ease-in-out reverse;}"],e=>e.theme.margin,e=>e.theme.margin,e=>Ra(.2,e.theme.colors.bgBody),e=>e.theme.boxShadowSoft,e=>e.theme.radius,IS,IS),iK=A(tK).withConfig({displayName:"Popover__Arrow",componentId:"sc-25cfb5b1-2"})(["fill:",";"],e=>e.theme.colors.bg2),UR=h.createContext(h.createRef()),WR=({children:e})=>{const t=h.useRef(null);return c.jsx(oK,{ref:t,children:c.jsx(UR.Provider,{value:t,children:e})})},oK=A.div.withConfig({displayName:"Popover__ContainerDiv",componentId:"sc-25cfb5b1-3"})(["display:contents;"]),xg=A.div.withConfig({displayName:"Slot",componentId:"sc-5963ea68-0"})(["grid-area:",";"],e=>e.slot);function Cr(e){const{bindShow:t,onCancel:n,onSuccess:r,triggerRef:i}=e??{},[o,a]=h.useState(!1),[s,u]=h.useState(!1),[l,d]=h.useState(!1),f=h.useCallback(()=>{document.body.setAttribute("inert",""),a(!0),u(!0),t==null||t(!0)},[]),m=h.useCallback((v=!1)=>{d(v),a(!1)},[]),g=h.useCallback(()=>{var v;document.body.removeAttribute("inert"),t==null||t(!1),u(!1),l?r==null||r():n==null||n(),d(!1),(v=i==null?void 0:i.current)==null||v.focus()},[l,r,n]);return[h.useMemo(()=>({show:o,onClose:m,onClosed:g}),[o,m,g]),f,m,s]}var TS;(function(e){e.Title="title",e.Content="content",e.Actions="actions"})(TS||(TS={}));const VR=80,dl=`${VR}ms`;function _r(e){const t=h.useContext(i3);return t.current?Ln.createPortal(c.jsx(nK,{children:c.jsx(aK,{...e})}),t.current):null}const aK=({children:e,show:t,onClose:n,onClosed:r})=>{const i=h.useRef(null),o=h.useRef(null),{hasOpenInnerPopup:a}=o3();qx(t);const s=h.useCallback(()=>{n(!1)},[n]),u=h.useCallback(l=>{var d;!((d=o.current)!=null&&d.contains(l.target))&&o.current!==l.target&&s()},[o.current,s]);return Me("esc",()=>{s()},{enabled:t&&!a}),h.useLayoutEffect(()=>{!t&&i.current&&i.current.hasAttribute("open")&&i.current.setAttribute("data-closing","true")},[t]),h.useEffect(()=>{if(i.current&&(t&&(i.current.hasAttribute("open")||i.current.showModal()),i.current.hasAttribute("data-closing")))return EV(()=>{var l;i.current.close(),(l=i.current)==null||l.removeAttribute("data-closing"),r()},VR)},[t,r]),c.jsx(pK,{ref:i,onMouseDown:u,children:c.jsx(uK,{ref:o,children:c.jsx(WR,{children:c.jsxs(Kb,{children:[c.jsx(sK,{slot:"close",children:c.jsx(ue,{icon:!0,onClick:s,"aria-label":"close",children:c.jsx(lo,{})})}),e]})})})})},bi=({children:e,className:t})=>c.jsx(xg,{slot:"title",as:"header",className:t,children:e}),Xr=({children:e,className:t})=>c.jsx(lK,{slot:"content",as:"main",className:t,children:e}),Wi=({children:e,className:t})=>c.jsx(cK,{slot:"actions",as:"footer",className:t,children:e}),sK=A(xg).withConfig({displayName:"Dialog__CloseButtonSlot",componentId:"sc-d9f9a2d9-0"})(["justify-self:end;"]),lK=A(xg).withConfig({displayName:"Dialog__DialogContentSlot",componentId:"sc-d9f9a2d9-1"})(["overflow-x:auto;overflow-y:visible;max-height:calc(80vh - 8rem);padding-bottom:","rem;margin-inline:-","rem;padding-inline:","rem;"],({theme:e})=>e.margin,e=>e.theme.margin,e=>e.theme.margin),cK=A(xg).withConfig({displayName:"Dialog__DialogActionsSlot",componentId:"sc-d9f9a2d9-2"})(["display:flex;gap:","rem;align-items:center;justify-content:flex-end;border-top:1px solid ",";padding-top:1rem;"],e=>e.theme.margin,e=>e.theme.colors.bg2),uK=A.div.withConfig({displayName:"Dialog__StyledInnerDialog",componentId:"sc-d9f9a2d9-3"})(["display:grid;grid-template-columns:auto 2rem;grid-template-rows:1fr auto auto;gap:1rem;grid-template-areas:'title close' 'content content' 'actions actions';"]),dK=$o(["from{opacity:0;transform:translateY(5rem);}to{opacity:1;transform:translateY(0);}"]),fK=$o(["from{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px);}to{background-color:rgba(0,0,0,0.383);backdrop-filter:blur(5px);}"]),pK=A.dialog.withConfig({displayName:"Dialog__StyledDialog",componentId:"sc-d9f9a2d9-4"})(["--animation-speed:500ms;box-sizing:border-box;inset:0px;position:relative;z-index:",";padding:","rem;color:",";background-color:",";border-radius:",";border:solid 1px ",";max-inline-size:min(90vw,100ch);min-inline-size:min(90vw,60ch);max-block-size:100vh;height:fit-content;max-height:90vh;overflow:visible;box-shadow:",";opacity:0;transform:translateY(5rem);transition:opacity "," ease-in-out,transform "," ease-in-out;&::backdrop{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px);transition:background-color "," ease-out,backdrop-filter "," ease-out;will-change:background-color,backdrop-filter;}&[open]{opacity:1;transform:translateY(0);animation:"," "," ease-in-out;}&[data-closing='true']{opacity:0;transform:translateY(5rem);}&[open]::backdrop{background-color:rgba(0,0,0,0.383);backdrop-filter:blur(5px);animation:"," "," ease-out;}&[data-closing='true']::backdrop{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px);}@media (max-width:","rem){max-inline-size:100%;max-block-size:100vh;}"],e=>e.theme.zIndex.dialog,e=>e.theme.margin,e=>e.theme.colors.text,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.boxShadowSoft,dl,dl,dl,dl,dK,dl,fK,dl,e=>e.theme.containerWidth);var om;(function(e){e.Default="default",e.Alert="alert"})(om||(om={}));function qR({title:e,confirmLabel:t="Confirm",onConfirm:n,onCancel:r,children:i,show:o,bindShow:a,theme:s="default"}){const[u,l,d]=Cr({bindShow:a,onCancel:r,onSuccess:n});return h.useEffect(()=>{o&&l()},[o]),o?c.jsxs(_r,{...u,children:[c.jsx(bi,{children:c.jsx("h1",{children:e})}),c.jsx(Xr,{children:i}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:()=>d(!0),alert:s==="alert",children:t})]})]}):c.jsx(c.Fragment,{})}const GR=$o(["from{background-color:var(--loader-bg-from);}to{background-color:var(--loader-bg-to);}"]),KR=A.span.withConfig({displayName:"Loader__LoaderInline",componentId:"sc-5a4734c8-0"})(["--loader-bg-from:",";--loader-bg-to:",";background-color:",";border-radius:",";animation:"," 0.8s infinite ease-in-out alternate;width:100%;height:1rem;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.radius,GR),hK=A.div.withConfig({displayName:"Loader__LoaderBlock",componentId:"sc-5a4734c8-1"})(["--loader-bg-from:",";--loader-bg-to:",";background-color:",";border-radius:",";animation:"," 0.8s infinite ease-in-out alternate;width:100%;height:100%;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.radius,GR),Le=h.forwardRef(({children:e,reverse:t,...n},r)=>c.jsx(YR,{...n,direction:t?"row-reverse":"row",ref:r,children:e}));Le.displayName="Row";const Ne=h.forwardRef(({children:e,reverse:t,...n},r)=>c.jsx(YR,{...n,direction:t?"column-reverse":"column",ref:r,children:e}));Ne.displayName="Column";const YR=A.div.withConfig({displayName:"Row__Flex",componentId:"sc-16aeb8a5-0"})(["align-items:",";display:flex;gap:",";justify-content:",";flex-direction:",";flex-wrap:",";width:",";height:",";& ","{align-self:flex-start;}& > p{margin:0;}"],e=>e.center?"center":"initial",e=>e.gap??`${e.theme.margin}rem`,e=>e.justify??"start",e=>e.direction??"row",e=>e.wrapItems?"wrap":"no-wrap",e=>e.fullWidth?"100%":"initial",e=>e.fullHeight?"100%":"initial",Jd);function mK({palette:e,onChange:t}){const n=r=>()=>t(r);return c.jsx(Le,{wrapItems:!0,children:e.map(r=>c.jsx(gK,{color:r,onClick:n(r)},r))})}const gK=A.button.withConfig({displayName:"PalettePicker__PaletteButton",componentId:"sc-8a41d9a3-0"})(["background-color:",";border:none;height:1.5rem;aspect-ratio:1/1;border-radius:50%;cursor:pointer;transform-origin:center;transition:",";&:hover,&:focus{outline:none;transform:scale(1.3);}"],({color:e})=>e,Wn("transform")),s3=$o(["from{opacity:0;}to{opacity:1;}"]),XR=["#FFBE0B","#FB5607","#FF006E","#8338EC","#3A86FF","#5FF56E"],l3=e=>{const t=ae(e),[n]=nt(t),[r,i]=re(t,F.properties.color,{commit:!0}),[o]=re(t,F.properties.emoji),a=o?`${o} ${n}`:n;return h.useMemo(()=>({color:r??"#FFFFFF",setColor:i,text:a}),[r,i,a])};function c3({subject:e,children:t}){const{color:n,text:r}=l3(e);return c.jsxs(QR,{color:n,children:[r,t]})}const QR=A.span.withConfig({displayName:"Tag__TagWrapper",componentId:"sc-59e46f04-0"})(["--tag-dark-color:",";--tag-mid-color:",";--tag-light-color:",";display:inline-flex;gap:0.5rem;align-items:center;padding-inline:0.5rem;padding-block:0.4rem;border-radius:1em;border:1px solid var(--tag-mid-color);color:",";line-height:1;text-align:center;min-width:3rem;background-color:",";&.selected-tag{text-decoration:underline;}"],e=>Ou(.11,e.color),e=>Ou(.4,e.color),e=>MH(.5,Ou(.9,e.color)),e=>e.theme.darkMode?"var(--tag-light-color)":"var(--tag-dark-color)",e=>e.theme.darkMode?"var(--tag-dark-color)":"var(--tag-light-color)");function vK({onClick:e,selected:t,subject:n}){const{color:r,text:i}=l3(n),o=h.useCallback(s=>{s.preventDefault(),s.stopPropagation(),e(n)},[e]),a=t?"selected-tag":"";return c.jsx(ZR,{color:r,as:"button",onClick:o,className:a,tabIndex:-1,children:i})}function JR({subject:e,onDelete:t}){const{color:n,setColor:r,text:i}=l3(e),[o,a]=h.useState(!1),s=h.useCallback(u=>{r(u),a(!1)},[r,a]);return c.jsx(a3,{open:o,onOpenChange:a,Trigger:c.jsx(ZR,{color:n,as:wg,children:i}),children:c.jsx(yK,{children:c.jsxs(Ne,{children:[c.jsx(mK,{palette:XR,onChange:s}),c.jsx(bK,{onClick:()=>t(e),children:c.jsxs(Le,{gap:"0.5rem",children:[c.jsx(Ls,{}),"Delete"]})})]})})})}const ZR=A(QR).withConfig({displayName:"Tag__TagWrapperButton",componentId:"sc-59e46f04-1"})(["cursor:pointer;user-select:none;transition:",";animation:"," 0.2s ease-in-out;&:hover,&:focus,&.selected-tag{--shadow-color:",";filter:brightness(1.05);box-shadow:0 1px 20px 0px var(--shadow-color);}"],Wn("filter","box-shadow"),s3,({theme:e})=>e.darkMode?"var(--dark-color)":"var(--light-color)"),yK=A.div.withConfig({displayName:"Tag__PopoverContent",componentId:"sc-59e46f04-2"})(["padding:1rem;border-radius:",";border:1px solid ",";max-width:20rem;"],e=>e.theme.radius,e=>e.theme.colors.bg2),bK=A(ue).withConfig({displayName:"Tag__DeleteButton",componentId:"sc-59e46f04-3"})(["background-color:",";border:none;&:hover,&:focus{background-color:"," !important;}"],e=>e.theme.colors.alert,e=>Ii(.1,e.theme.colors.alert)),wK="modulepreload",xK=function(e){return"/"+e},OS={},Sg=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link");i=Promise.all(n.map(a=>{if(a=xK(a),a in OS)return;OS[a]=!0;const s=a.endsWith(".css"),u=s?'[rel="stylesheet"]':"";if(!!r)for(let f=o.length-1;f>=0;f--){const m=o[f];if(m.href===a&&(!s||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":wK,s||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),s)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};function SK(e){return e[Math.floor(Math.random()*e.length)]}function Bs(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/[^\w-]+/g,"")}const CK=A.div.withConfig({displayName:"InputStyles__FieldStyled",componentId:"sc-bfd5877-0"})(["margin-bottom:","rem;"],e=>e.theme.margin),_K=A.div.withConfig({displayName:"InputStyles__LabelWrapper",componentId:"sc-bfd5877-1"})(["display:flex;align-items:center;margin-bottom:0.5rem;"]),eP=A.label.withConfig({displayName:"InputStyles__LabelStyled",componentId:"sc-bfd5877-2"})(["font-weight:bold;display:block;"]),kK=A.label.withConfig({displayName:"InputStyles__LabelHelper",componentId:"sc-bfd5877-3"})(["font-size:0.9em;display:block;"]),ht=A.div.withConfig({displayName:"InputStyles__InputWrapper",componentId:"sc-bfd5877-4"})(["display:flex;flex:1;--border-color:",";border:solid 1px var(--border-color);border-radius:",";overflow:hidden;&:hover:has(input:not(:disabled)){border-color:",";}&:focus-within{border:solid 1px ",";background-color:",";}"],({$invalid:e,theme:t})=>e?t.colors.alert:t.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.bg),u3=cn(["height:2rem;flex:1;color:",";font-size:1em;padding:","rem;border:none;--webkit-appearance:none;box-shadow:none;display:block;background-color:",";border:solid 1px ",";outline:none;box-sizing:border-box;border-top-left-radius:",";border-bottom-left-radius:",";transition:border 100ms ease-in-out;&:disabled{background-color:",";border-color:",";color:",";}&:last-child{border-radius:",";}"],e=>e.theme.colors.text,e=>e.theme.margin/2,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.bg1,e=>e.theme.colors.textLight,e=>e.theme.radius),wt=A.input.withConfig({displayName:"InputStyles__InputStyled",componentId:"sc-bfd5877-5"})(["",""],u3),jK=A.textarea.withConfig({displayName:"InputStyles__TextAreaStyled",componentId:"sc-bfd5877-6"})([""," min-height:5rem;height:unset;"],u3),gn=A.div.withConfig({displayName:"InputStyles__ErrMessage",componentId:"sc-bfd5877-7"})(["font-size:0.8em;line-height:1rem;color:",";margin-bottom:","rem;"],e=>e.theme.colors.alert,e=>e.theme.margin),EK=A.span.withConfig({displayName:"InputStyles__InlineErrMessage",componentId:"sc-bfd5877-8"})(["font-size:0.8em;line-height:1rem;color:",";"],e=>e.theme.colors.alert),RK=A.div.withConfig({displayName:"InputStyles__InputOverlay",componentId:"sc-bfd5877-9"})([""," position:absolute;pointer-events:none !important;border:transparent;line-height:1rem;width:100%;border-color:rgba(0,0,0,0);"],u3),PK=h.lazy(()=>Sg(()=>import("./chunk_EmojiInput.js"),__vite__mapDeps([])));function tP({parent:e,onNewTag:t}){const n=be(),[r,i]=h.useState(""),[o,a]=h.useState(),[s,u]=h.useState(0),l=h.useCallback(async()=>{const m=await n.buildUniqueSubjectFromParts(["tag",r],e),g=await n.newResource({subject:m,parent:e,isA:Be.classes.tag,propVals:{[ve.properties.shortname]:r,[Be.properties.color]:SK(XR)}});o&&await g.set(Be.properties.emoji,o,n),t(g),i(""),a(void 0),u(y=>y+1)},[e,n,r,o,t]),d=h.useCallback(m=>{i(Bs(m.target.value))},[]),f=h.useCallback(m=>{m.key==="Enter"&&(m.preventDefault(),l())},[l]);return c.jsx(h.Suspense,{fallback:c.jsx("div",{children:"Loading..."}),children:c.jsxs(Le,{children:[c.jsxs(ht,{children:[c.jsx(PK,{onChange:a},s),c.jsx(wt,{placeholder:"New tag",value:r,onChange:d,onKeyDown:f})]}),c.jsx(ue,{title:"Add tag",onClick:l,disabled:!r,children:c.jsx(qn,{})})]})})}function AK({subject:e}){return c.jsx(IK,{children:c.jsx(c3,{subject:e})})}const IK=A.span.withConfig({displayName:"TagInline__TagWrapper",componentId:"sc-4ed0d003-0"})(["display:inline-block;padding-block:2px;"]),nP=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/bmp","image/tiff","image/vnd.microsoft.icon","image/vnd.adobe.photoshop","image/heic","image/heif","image/heif-sequence","image/heic-sequence","image/avif","image/avif-sequence"]),TK=new Set(["application/zip","application/x-7z-compressed","application/x-rar-compressed","application/x-tar","application/x-gzip","application/x-bzip2","application/x-xz","application/x-lzip","application/x-lzma","application/x-lzop","application/vnd.rar","application/x-rar-compressed"]),OK=new Set(["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-word.document.macroEnabled.12"]),DK=new Set(["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]);function rP(e){return e==="application/pdf"?ZU:OK.has(e)?tW:DK.has(e)?XU:TK.has(e)?GU:e==="text/csv"?YU:e.startsWith("audio/")?KU:e.startsWith("video/")?eW:e.startsWith("image/")?QU:e!=null&&e.startsWith("text/")?$9:Bx}function NK({subject:e}){const t=ae(e),[n]=re(t,K.file.filename),[r]=re(t,K.file.mimetype),[i]=re(t,K.file.downloadUrl),o=nP.has(r??""),a=rP(r??"");return c.jsxs(MK,{children:[o?c.jsx($K,{src:i,alt:t.title,loading:"lazy"}):c.jsx(a,{}),n]})}const MK=A.span.withConfig({displayName:"FileInline__Wrapper",componentId:"sc-783b1d75-0"})(["display:inline-flex;align-items:center;height:2rem;gap:0.7ch;& svg{font-size:1rem;}"]),$K=A.img.withConfig({displayName:"FileInline__Img",componentId:"sc-783b1d75-1"})(["aspect-ratio:1/1;object-fit:cover;border-radius:5px;height:100%;"]);function Ft({subject:e,untabbable:t,basic:n,className:r}){const i=ae(e,{allowIncomplete:!0}),[o]=Se(i,F.properties.isA),a=n?DS:LK.get(o[0])??DS;return e?i.error?c.jsx(Ve,{subject:e,untabbable:t,children:c.jsx(gt,{about:e,title:i.error.message,children:"Unknown Resource"})}):i.loading?c.jsx(KR,{about:e,children:"loading..."}):bn.isValidSubject(e)?c.jsx(Ve,{subject:e,untabbable:t,className:r,children:c.jsx(a,{subject:e})}):c.jsxs(gt,{children:[e," is not a valid subject."]}):c.jsx(gt,{children:"No subject passed"})}function DS({subject:e}){const t=ae(e),[n]=re(t,F.properties.description);return c.jsx("span",{title:n||"",children:t.title})}const LK=new Map([[F.classes.tag,AK],[F.classes.file,NK]]);function FK({collection:e,index:t}){const n=_x(e,t);return n.getSubject()===Nt?c.jsx(NS,{children:c.jsx(gt,{children:"Insufficient rights to view resource"})}):n.hasClasses(ft.commit)?c.jsx(c.Fragment,{}):c.jsx(NS,{children:c.jsx(Ft,{subject:n.getSubject()})})}const NS=A.li.withConfig({displayName:"UsageRow__ListItem",componentId:"sc-f0e74c4f-0"})(["list-style:none;padding:0.5rem 1rem;border-radius:",";margin-left:0;&:nth-child(odd){background-color:",";}"],({theme:e})=>e.radius,({theme:e})=>e.colors.bg1);function zK(e,t){return new Array(Math.min(100,e.totalMembers)).fill(0).map((n,r)=>t(r))}function gs({collection:e,title:t}){return c.jsx(BK,{children:c.jsx(Bl,{title:c.jsx(c.Fragment,{children:t}),children:c.jsxs(UK,{children:[e.totalMembers>100&&c.jsxs(WK,{children:["Showing 100 of ",e.totalMembers]}),c.jsx(HK,{children:zK(e,n=>c.jsx(FK,{collection:e,index:n},1))})]})})})}const BK=A.div.withConfig({displayName:"UsageCard__DetailsCard",componentId:"sc-1a9a07a4-0"})(["border:1px solid ",";border-radius:",";padding:","rem;background-color:",";"],({theme:e})=>e.colors.bg2,({theme:e})=>e.radius,({theme:e})=>e.margin,({theme:e})=>e.colors.bg),HK=A.ul.withConfig({displayName:"UsageCard__List",componentId:"sc-1a9a07a4-1"})(["margin:0;padding:0;"]),UK=A(Ne).withConfig({displayName:"UsageCard__ContentWrapper",componentId:"sc-1a9a07a4-2"})(["margin-top:","rem;"],({theme:e})=>e.margin),WK=A.span.withConfig({displayName:"UsageCard__LimitMessage",componentId:"sc-1a9a07a4-3"})(["text-align:end;color:",";"],({theme:e})=>e.colors.textLight);function d3({resource:e}){const{collection:t}=jo({property:K.parent,value:e.getSubject()});return t.totalMembers===0?c.jsx(c.Fragment,{}):c.jsx(gs,{collection:t,title:c.jsxs("span",{children:["This resource has ",c.jsx("strong",{children:t.totalMembers})," children"]})})}function VK({resource:e}){const{collection:t}=jo({property:e.getSubject()}),{collection:n}=jo({property:K.requires,value:e.getSubject()}),{collection:r}=jo({property:K.recommends,value:e.getSubject()}),i=t.totalMembers,o=n.totalMembers,a=r.totalMembers;return c.jsxs(Ne,{children:[c.jsx(d3,{resource:e}),i>0&&c.jsx(gs,{collection:t,title:c.jsxs("span",{children:[c.jsx("strong",{children:i})," resources have a ",e.title," ","property"]})}),o>0&&c.jsx(gs,{collection:n,title:c.jsxs("span",{children:[c.jsx("strong",{children:o})," classes require this property"]})}),a>0&&c.jsx(gs,{collection:r,title:c.jsxs("span",{children:[c.jsx("strong",{children:a})," classes recommend this property"]})})]})}function qK({resource:e}){const{collection:t}=jo({property:K.isA,value:e.getSubject()}),{collection:n}=jo({property:K.classType,value:e.getSubject()}),r=t.totalMembers,i=n.totalMembers,o=r+i;return c.jsxs(Ne,{children:[c.jsx(d3,{resource:e}),o===0&&"No usage of class found.",r>0&&c.jsx(gs,{collection:t,title:c.jsxs("span",{children:[c.jsx("strong",{children:r})," resources are an instance of"," ",e.title]})}),i>0&&c.jsx(gs,{collection:n,title:c.jsxs("span",{children:[c.jsx("strong",{children:i})," properties have ",e.title," ","as a classtype."]})})]})}function f3({resource:e}){return e.hasClasses(ft.property)?c.jsx(VK,{resource:e}):e.hasClasses(ft.class)?c.jsx(qK,{resource:e}):c.jsx(GK,{resource:e})}function GK({resource:e}){const{collection:t}=jo({value:e.getSubject()});return c.jsxs(c.Fragment,{children:[c.jsx(d3,{resource:e}),c.jsx(gs,{collection:t,title:c.jsxs("span",{children:[c.jsx("strong",{children:t.totalMembers})," resources reference"," ",e.title]})})]})}var sc;(function(e){e.View="view",e.Data="data",e.Edit="edit",e.Refresh="refresh",e.Scope="scope",e.Share="share",e.Delete="delete",e.History="history",e.Import="import"})(sc||(sc={}));function Cg({subject:e,showOnly:t,trigger:n,simple:r,isMainMenu:i,title:o,bindActive:a,onAfterDelete:s}){const u=be(),l=xt(),d=Ms(),f=ae(e),[m,g]=h.useState(!1),[y]=or(),{enableScope:v}=gg(e),_=h.useCallback(async()=>{const p=f.get(ve.properties.parent);try{await f.destroy(u),s==null||s(),lt.success("Resource deleted!"),y===e&&l(p?mt(p):"/")}catch(w){lt.error(w.message)}},[f,l,y,s]);if(e===void 0||!bn.isValidSubject(e))return null;const x=[...r?[]:[{disabled:d.pathname.startsWith(Fe.show),id:"view",label:"normal view",helper:"Open the regular, default View.",onClick:()=>l(mt(e))},{disabled:d.pathname.startsWith(Fe.data),id:"data",label:"data view",helper:"View the resource and its properties in the Data View.",shortcut:ot.data,onClick:()=>l(q9(e))},Zh,{id:"refresh",icon:c.jsx(fW,{}),label:"refresh",helper:"Fetch the resouce again from the server, possibly see new changes.",onClick:()=>u.fetchResourceFromServer(e)}],{id:"edit",label:"edit",helper:"Open the edit form.",icon:c.jsx(Ha,{}),shortcut:r?"":ot.edit,onClick:()=>l(cg(e))},{id:"scope",label:"search in",helper:"Scope search to resource",icon:c.jsx(Qd,{}),onClick:v},{id:"share",label:"share",icon:c.jsx(z9,{}),helper:"Open the share menu",onClick:()=>l(_W(e))},{id:"delete",icon:c.jsx(Ls,{}),label:"delete",helper:"Delete this resource.",onClick:()=>g(!0)},{id:"history",icon:c.jsx(Mx,{}),label:"history",helper:"Show the history of this resource",onClick:()=>l(EW(e))},{id:"import",icon:c.jsx(Fx,{}),label:"import",helper:"Import Atomic Data to this resource",onClick:()=>l(jW(e))}],S=t?x.filter(p=>!Hl(p)||t.includes(p.id)):x,C=n??ef(c.jsx(ag,{}),o??`Open ${f.title} menu`);return c.jsxs(c.Fragment,{children:[c.jsx(mg,{items:S,trigger:C,isMainMenu:i,bindActive:a}),c.jsx(qR,{title:"Delete resource",show:m,bindShow:g,theme:om.Alert,confirmLabel:"Delete",onConfirm:_,children:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["Are you sure you want to delete ",c.jsx(Ft,{subject:e})]}),c.jsx(f3,{resource:f})]})})]})}function KK({subject:e,className:t}){const n=ae(e),[r]=nt(n),[i,o]=h.useState(!1),a=J9(e);return c.jsxs(e2,{className:t,dropdownActive:i,children:[c.jsx(Wt,{"data-test":"add-subresource",onClick:a,title:`Create new resource under ${r}`,children:c.jsx(qn,{})}),c.jsx(Cg,{simple:!0,subject:e,trigger:XK,bindActive:o})]})}const e2=A.span.withConfig({displayName:"FloatingActions__Wrapper",componentId:"sc-376a8af8-0"})(["visibility:",";font-size:0.9rem;color:",";"],e=>e.dropdownActive?"visible":"hidden",e=>e.theme.colors.main),YK=cn(["position:relative;&:hover ",",&:focus-within ","{visibility:visible;}"],e2,e2),XK=ef(c.jsx(ag,{})),QK=new Map([[ft.folder,L9],[ft.bookmark,N9],[ft.chatRoom,WU],[ft.document,$9],[ft.file,Bx],[ft.drive,F9],[ft.commit,Mx],[ft.importer,JU],[ft.invite,z9],[ft.collection,sW],[ft.class,og],[ft.property,VU],[ft.table,B9],[ft.property,Es],[ft.ontology,hW]]);function Fo(e,t=Dx){return QK.get(e)??t}function iP({subject:e,ancestry:t,onClick:n}){const r=h.useRef(null),i=ae(e,{allowIncomplete:!0}),[o]=or(),[a]=nt(i),[s]=re(i,F.properties.description),u=o===e,[l,d]=h.useState(u),[f]=Se(i,F.properties.subResources),m=f.length>0,[g]=Se(i,F.properties.isA),y=Fo(g[0]);h.useEffect(()=>{t.includes(e)&&t[0]!==e&&d(!0)},[t]);const v=h.useMemo(()=>c.jsxs(JK,{children:[c.jsx(MS,{subject:e,clean:!0,children:c.jsx(zl,{onClick:n,disabled:u,resource:e,title:s,ref:r,children:c.jsxs(oP,{children:[c.jsx(y,{}),a]})})}),c.jsx(KK,{subject:e})]}),[e,u,n,s,a]);return i.loading?c.jsx(zl,{onClick:n,disabled:u,resource:e,title:`${e} is loading...`,children:c.jsx(KR,{})}):i.error?c.jsx(MS,{subject:e,clean:!0,children:c.jsx(zl,{onClick:n,disabled:u,resource:e,ref:r,children:c.jsxs(ZK,{children:[c.jsx(zx,{}),"Resource with error"]})})}):c.jsx(Bl,{initialState:l,open:l,disabled:!m,onStateToggle:d,"data-test":"resource-sidebar",title:v,children:m&&f.map(_=>c.jsx(iP,{subject:_,ancestry:t},_))})}const JK=A.div.withConfig({displayName:"ResourceSideBar__ActionWrapper",componentId:"sc-876e43ec-0"})(["position:relative;display:flex;width:100%;margin-left:-0.7rem;",""],YK),MS=A(Ve).withConfig({displayName:"ResourceSideBar__StyledLink",componentId:"sc-876e43ec-1"})(["flex:1;overflow:hidden;white-space:nowrap;"]),oP=A.span.withConfig({displayName:"ResourceSideBar__TextWrapper",componentId:"sc-876e43ec-2"})(["display:inline-flex;align-items:center;gap:0.4rem;"]),ZK=A(oP).withConfig({displayName:"ResourceSideBar__SideBarErrorWrapper",componentId:"sc-876e43ec-3"})(["margin-left:1.3rem;",""],Y9),eY=A("div").withConfig({displayName:"SideBarHeader",componentId:"sc-9ccced4f-0"})(["margin-top:","rem;margin-bottom:0.5rem;padding-left:","rem;padding-right:0.7rem;font-size:1.4rem;font-weight:bold;display:flex;"],e=>e.theme.margin,e=>e.theme.margin);function aP(){return!1}const o1=[window.location.origin,"https://atomicdata.dev"],tY={commit:!0};function _g(){const{agent:e}=Xe(),t=be(),n=ae(e==null?void 0:e.subject),[r,i]=Se(n,F.properties.drives,tY),o=h.useMemo(()=>[...o1,...r],[r]),a=h.useCallback(u=>{o1.includes(u)||r.includes(u)||i([...r,u]).then(()=>{n.save(t)})},[r,i]),s=h.useCallback(u=>{o1.includes(u)||r.includes(u)&&i(r.filter(l=>l!==u)).then(()=>{n.save(t)})},[r,i]);return[o,a,s]}const nY=5;function p3(e=[],t=Number.MAX_VALUE){const[n]=_g(),[r,i]=Di("driveHistory",[]),o=h.useCallback(u=>{i(l=>l[0]===u?l:[u,...l.filter(d=>d!==u)].slice(0,nY))},[n,i]),a=h.useCallback(u=>{i(l=>l.filter(d=>d!==u))},[i]);return[h.useMemo(()=>r.slice(0,t).filter(u=>!e.includes(u)),[r,e]),o,a]}const h3=(e=15)=>{const t="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n},sP=(e,t)=>`${e}${t?`/${t}/`:""}${h3(15)}`,rY=e=>encodeURIComponent(e.replace(/\s/g,"-")),lP=e=>rY((e==null?void 0:e[ve.properties.shortname])??(e==null?void 0:e[ve.properties.name])??h3(8));function _c(){const e=be(),t=xt();return h.useCallback(async(n,r,i,o)=>{const a=await e.getResourceAsync(n),s=lP(r),u=await e.buildUniqueSubjectFromParts([a.props.shortname,s],i),l=new Fi(u,!0);await l.addClasses(e,n),await Promise.all([...Object.entries(r).map(([d,f])=>l.set(d,f,e)),!!i&&l.set(ve.properties.parent,i,e)]);try{await l.save(e),t(mt(u,o)),lt.success(`${a.title} created`),e.notifyResourceManuallyCreated(l)}catch(d){e.notifyError(d)}return l},[e,t,parent])}const t2=new Map,n2=new Map;function m3(){const{showNewResourceUI:e}=h.useContext(cP);return e}const Xf=(e,t)=>{t2.set(e,t)},Qf=(e,t)=>{n2.set(e,t)},cP=h.createContext({showNewResourceUI:()=>{}});function iY({children:e}){const t=be(),n=Xe(),r=_c(),[i,o]=h.useState(void 0),a=Ua(),s=h.useCallback(async(l,d)=>{var m;if(t2.has(l)){const g=()=>{o(void 0)},y=t2.get(l);o(c.jsx(y,{parent:d,onClose:g}));return}if(n2.has(l)){try{await((m=n2.get(l))==null?void 0:m(d,r,{store:t,settings:n}))}catch(g){t.notifyError(g)}return}const f=await t.getResourceAsync(l);a(V9(l,d,t.createSubject(f.props.shortname)))},[]),u=h.useMemo(()=>({showNewResourceUI:s}),[s]);return c.jsxs(cP.Provider,{value:u,children:[e,i]})}const oY=ef(c.jsx(F9,{}),"Open Drive Settings");function Jf(e){return e.get(ve.properties.name)??e.getSubject()}function aY(e,t){return new Map([...e].filter(([n])=>!t.has(n)))}function sY(){const e=xt(),{drive:t,setDrive:n,agent:r}=Xe(),[i]=_g(),[o,a]=p3(i,5),s=Uh(i),u=Uh(o),l=m=>()=>{n(m),a(m),e(mt(m))},d=m3(),f=h.useMemo(()=>[...Array.from(s.entries()).map(([m,g])=>({id:m,label:Jf(g),helper:`Switch to ${Jf(g)}`,disabled:m===t,onClick:()=>{n(m),e(mt(m))},icon:m===t?c.jsx(iS,{}):c.jsx(oS,{})})).slice(0,5),Zh,...Array.from(aY(u,s)).map(([m,g])=>({label:Jf(g),id:m,helper:`Switch to ${Jf(g)}`,icon:m===t?c.jsx(iS,{}):c.jsx(oS,{}),onClick:l(m),disabled:m===t})).slice(0,5),Zh,{id:"configure-drives",label:"Configure Drives",icon:c.jsx($x,{}),helper:"Load drives not displayed in this list.",onClick:()=>e(Fe.serverSettings)},{id:"new-drive",label:"New Drive",icon:c.jsx(qn,{}),helper:"Create a new drive",onClick:()=>d(xa.classes.drive,(r==null?void 0:r.subject)??"")}],[s,t,u]);return c.jsx(mg,{trigger:oY,items:f})}const lY=h.createContext(void 0);function g3(e){const t=h.useContext(lY);return e||t||"ltr"}function cY(e,[t,n]){return Math.min(n,Math.max(t,e))}function uY(e,t){return h.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const uP="ScrollArea",[dP,Sxe]=xc(uP),[dY,wi]=dP(uP),fY=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=h.useState(null),[l,d]=h.useState(null),[f,m]=h.useState(null),[g,y]=h.useState(null),[v,_]=h.useState(null),[x,S]=h.useState(0),[C,p]=h.useState(0),[w,b]=h.useState(!1),[k,E]=h.useState(!1),I=Vn(t,P=>u(P)),j=g3(i);return h.createElement(dY,{scope:n,type:r,dir:j,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:d,content:f,onContentChange:m,scrollbarX:g,onScrollbarXChange:y,scrollbarXEnabled:w,onScrollbarXEnabledChange:b,scrollbarY:v,onScrollbarYChange:_,scrollbarYEnabled:k,onScrollbarYEnabledChange:E,onCornerWidthChange:S,onCornerHeightChange:p},h.createElement(wn.div,pe({dir:j},a,{ref:I,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})))}),pY="ScrollAreaViewport",hY=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=wi(pY,n),a=h.useRef(null),s=Vn(t,a,o.onViewportChange);return h.createElement(h.Fragment,null,h.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),h.createElement(wn.div,pe({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),h.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),zo="ScrollAreaScrollbar",mY=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wi(zo,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return h.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?h.createElement(gY,pe({},r,{ref:t,forceMount:n})):i.type==="scroll"?h.createElement(vY,pe({},r,{ref:t,forceMount:n})):i.type==="auto"?h.createElement(fP,pe({},r,{ref:t,forceMount:n})):i.type==="always"?h.createElement(v3,pe({},r,{ref:t})):null}),gY=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wi(zo,e.__scopeScrollArea),[o,a]=h.useState(!1);return h.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},d=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),h.createElement(Wa,{present:n||o},h.createElement(fP,pe({"data-state":o?"visible":"hidden"},r,{ref:t})))}),vY=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wi(zo,e.__scopeScrollArea),o=e.orientation==="horizontal",a=jg(()=>u("SCROLL_END"),100),[s,u]=uY("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),h.useEffect(()=>{const l=i.viewport,d=o?"scrollLeft":"scrollTop";if(l){let f=l[d];const m=()=>{const g=l[d];f!==g&&(u("SCROLL"),a()),f=g};return l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[i.viewport,o,u,a]),h.createElement(Wa,{present:n||s!=="hidden"},h.createElement(v3,pe({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:$t(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:$t(e.onPointerLeave,()=>u("POINTER_LEAVE"))})))}),fP=h.forwardRef((e,t)=>{const n=wi(zo,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=h.useState(!1),s=e.orientation==="horizontal",u=jg(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(s?l:d)}},10);return lc(n.viewport,u),lc(n.content,u),h.createElement(Wa,{present:r||o},h.createElement(v3,pe({"data-state":o?"visible":"hidden"},i,{ref:t})))}),v3=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=wi(zo,e.__scopeScrollArea),o=h.useRef(null),a=h.useRef(0),[s,u]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=gP(s.viewport,s.content),d={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function f(m,g){return kY(m,a.current,s,g)}return n==="horizontal"?h.createElement(yY,pe({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,g=$S(m,s,i.dir);o.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,i.dir))}})):n==="vertical"?h.createElement(bY,pe({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,g=$S(m,s);o.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}})):null}),yY=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wi(zo,e.__scopeScrollArea),[a,s]=h.useState(),u=h.useRef(null),l=Vn(t,u,o.onScrollbarXChange);return h.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),h.createElement(hP,pe({"data-orientation":"horizontal"},i,{ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kg(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),yP(m,f)&&d.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:am(a.paddingLeft),paddingEnd:am(a.paddingRight)}})}}))}),bY=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=wi(zo,e.__scopeScrollArea),[a,s]=h.useState(),u=h.useRef(null),l=Vn(t,u,o.onScrollbarYChange);return h.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),h.createElement(hP,pe({"data-orientation":"vertical"},i,{ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kg(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),yP(m,f)&&d.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:am(a.paddingTop),paddingEnd:am(a.paddingBottom)}})}}))}),[wY,pP]=dP(zo),hP=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:d,onResize:f,...m}=e,g=wi(zo,n),[y,v]=h.useState(null),_=Vn(t,I=>v(I)),x=h.useRef(null),S=h.useRef(""),C=g.viewport,p=r.content-r.viewport,w=Fn(d),b=Fn(u),k=jg(f,10);function E(I){if(x.current){const j=I.clientX-x.current.left,P=I.clientY-x.current.top;l({x:j,y:P})}}return h.useEffect(()=>{const I=j=>{const P=j.target;(y==null?void 0:y.contains(P))&&w(j,p)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[C,y,p,w]),h.useEffect(b,[r,b]),lc(y,k),lc(g.content,k),h.createElement(wY,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:Fn(o),onThumbPointerUp:Fn(a),onThumbPositionChange:b,onThumbPointerDown:Fn(s)},h.createElement(wn.div,pe({},m,{ref:_,style:{position:"absolute",...m.style},onPointerDown:$t(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),x.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E(I))}),onPointerMove:$t(e.onPointerMove,E),onPointerUp:$t(e.onPointerUp,I=>{const j=I.target;j.hasPointerCapture(I.pointerId)&&j.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=S.current,x.current=null})})))}),r2="ScrollAreaThumb",xY=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pP(r2,e.__scopeScrollArea);return h.createElement(Wa,{present:n||i.hasThumb},h.createElement(SY,pe({ref:t},r)))}),SY=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=wi(r2,n),a=pP(r2,n),{onThumbPositionChange:s}=a,u=Vn(t,f=>a.onThumbChange(f)),l=h.useRef(),d=jg(()=>{l.current&&(l.current(),l.current=void 0)},100);return h.useEffect(()=>{const f=o.viewport;if(f){const m=()=>{if(d(),!l.current){const g=jY(f,s);l.current=g,s()}};return s(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[o.viewport,d,s]),h.createElement(wn.div,pe({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:$t(e.onPointerDownCapture,f=>{const g=f.target.getBoundingClientRect(),y=f.clientX-g.left,v=f.clientY-g.top;a.onThumbPointerDown({x:y,y:v})}),onPointerUp:$t(e.onPointerUp,a.onThumbPointerUp)}))}),mP="ScrollAreaCorner",CY=h.forwardRef((e,t)=>{const n=wi(mP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.createElement(_Y,pe({},e,{ref:t})):null}),_Y=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=wi(mP,n),[o,a]=h.useState(0),[s,u]=h.useState(0),l=!!(o&&s);return lc(i.scrollbarX,()=>{var d;const f=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(f),u(f)}),lc(i.scrollbarY,()=>{var d;const f=((d=i.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;i.onCornerWidthChange(f),a(f)}),l?h.createElement(wn.div,pe({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function am(e){return e?parseInt(e,10):0}function gP(e,t){const n=e/t;return isNaN(n)?0:n}function kg(e){const t=gP(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function kY(e,t,n,r="ltr"){const i=kg(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return vP([u,l],f)(e)}function $S(e,t,n="ltr"){const r=kg(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=cY(e,u);return vP([0,a],[0,s])(l)}function vP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yP(e,t){return e>0&&e<t}const jY=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function jg(e,t){const n=Fn(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function lc(e,t){const n=Fn(t);Ps(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const EY=fY,RY=hY,PY=mY,AY=xY,IY=CY,i2="0.8rem",Hs=h.forwardRef(({children:e,className:t,type:n="scroll"},r)=>c.jsxs(EY,{type:n,className:t,children:[c.jsx(bP,{ref:r,children:e}),c.jsx(LS,{orientation:"vertical",children:c.jsx(FS,{})}),c.jsx(LS,{orientation:"horizontal",children:c.jsx(FS,{})}),c.jsx(IY,{})]}));Hs.displayName="ScrollArea";const LS=A(PY).withConfig({displayName:"ScrollArea__ScrollBar",componentId:"sc-36a5a54-0"})(["display:flex;user-select:none;touch-action:none;padding:2px;background-color:transparent;transition:background-color "," ease-out;&[data-orientation='horizontal']{flex-direction:column;height:",";}&[data-orientation='vertical']{width:",";}"],e=>e.theme.animation.duration,()=>i2,()=>i2),FS=A(AY).withConfig({displayName:"ScrollArea__Thumb",componentId:"sc-36a5a54-1"})(["position:relative;bottom:1px;flex:1;background-color:",";border-radius:",";backdrop-filter:blur(10px);z-index:2;"],e=>Ra(.25,e.theme.colors.bg2),()=>i2),bP=A(RY).withConfig({displayName:"ScrollArea__ScrollViewPort",componentId:"sc-36a5a54-2"})(["width:100%;height:100%;& > div[style]{display:block !important;}"]);function TY({handleClickItem:e}){const t=be(),{drive:n,agent:r}=Xe(),i=ae(n),[o]=Se(i,F.properties.subResources),[a]=nt(i),s=xt(),[u]=Sr(i),[l]=or(),d=ae(l),[f,m]=h.useState([]);return h.useEffect(()=>{t.getResourceAncestry(d).then(g=>{m(g)})},[t,d]),c.jsxs(c.Fragment,{children:[c.jsxs(eY,{children:[c.jsx(DY,{clean:!0,title:`Your current baseURL is ${n}`,"data-test":"sidebar-drive-open",onClick:()=>{e(),s(mt(n))},children:c.jsxs(OY,{"data-test":"current-drive-title",children:[a||n," "]})}),c.jsxs($Y,{gap:"0",children:[u&&c.jsx(Wt,{onClick:()=>s(Fe.new),title:`Create a new resource in this drive (${ot.new})`,"data-test":"sidebar-new-resource",children:c.jsx(qn,{})}),c.jsx(sY,{})]})]}),c.jsx(LY,{children:c.jsx(MY,{children:i.isReady()?o.map(g=>c.jsx(iP,{subject:g,ancestry:f,onClick:e},g)):i.loading?null:c.jsx(NY,{children:i.error&&(i.isUnauthorized()&&r?"unauthorized":i.error.message)})})})]})}const OY=A.h2.withConfig({displayName:"SideBarDrive__DriveTitle",componentId:"sc-2a0c7693-0"})(["margin:0;padding:0;font-size:1.4rem;flex:1;"]),DY=A(ue).withConfig({displayName:"SideBarDrive__TitleButton",componentId:"sc-2a0c7693-1"})(["text-align:left;flex:1;"]),NY=A(gt).withConfig({displayName:"SideBarDrive__SideBarErr",componentId:"sc-2a0c7693-2"})(["padding-left:","rem;"],e=>e.theme.margin),MY=A.div.withConfig({displayName:"SideBarDrive__ListWrapper",componentId:"sc-2a0c7693-3"})(["overflow-x:hidden;margin-left:0.5rem;"]),$Y=A(Le).withConfig({displayName:"SideBarDrive__HeadingButtonWrapper",componentId:"sc-2a0c7693-4"})(["color:",";font-size:0.9rem;"],e=>e.theme.colors.main),LY=A(Hs).withConfig({displayName:"SideBarDrive__StyledScrollArea",componentId:"sc-2a0c7693-5"})(["overflow:hidden;"]),FY=`
* {
cursor: col-resize;
user-select: none;
pointer-events: none;
}
`;function zY(e){const t=document.getElementById(e);if(t)return t;const n=document.createElement("style");return n.setAttribute("id",e),document.head.appendChild(n),n}function zS(e){const t=document.getElementById(e);t&&document.head.contains(t)&&document.head.removeChild(t)}function BS(e,t){const n=zY(e);t?n.innerHTML=FY:n.innerHTML=""}function wP({initialSize:e,onResize:t,minSize:n=0,maxSize:r=1/0}){const i=h.useRef(null),o=h.useRef(null),[a,s]=h.useState(!1),[u,l]=h.useState(`${e}px`),d=h.useId(),f=h.useRef(t);h.useEffect(()=>{f.current=t},[t]);const m=h.useRef(g=>{var x;const y=(x=i.current)==null?void 0:x.getBoundingClientRect(),v=g.clientX-((y==null?void 0:y.x)??0),_=Math.min(r,Math.max(n,v));requestAnimationFrame(()=>{var S;l(`${_}px`),(S=f.current)==null||S.call(f,_)})});return h.useEffect(()=>{if(!i.current||!o.current)return()=>{zS(d)};const g=v=>{v.stopPropagation(),v.target===o.current&&s(!0)},y=()=>{s(!1)};return o.current.addEventListener("mousedown",g),window.addEventListener("mouseup",y),()=>{var v;(v=o.current)==null||v.removeEventListener("mousedown",g),window.removeEventListener("mouseup",y),zS(d)}},[]),h.useEffect(()=>(a?(window.addEventListener("mousemove",m.current),BS(d,!0)):(window.removeEventListener("mousemove",m.current),BS(d,!1)),()=>{window.removeEventListener("mousemove",m.current)}),[a]),{size:u,targetRef:i,dragAreaRef:o,isDragging:a}}const xP=A.div.withConfig({displayName:"useResizable__DragAreaBase",componentId:"sc-45acc468-0"})(["--drag-color:",";position:absolute;cursor:col-resize;background-color:",";backdrop-filter:",";&:hover{transition:background-color 0.2s;background-color:var(--drag-color);backdrop-filter:blur(5px);}border-radius:",";"],e=>Ra(.7,e.theme.colors.main),({isDragging:e})=>e?"var(--drag-color)":"transparent",({isDragging:e})=>e?"blur(5px)":"none",({theme:e})=>e.radius);function BY(e,t=[]){return h.useCallback(n=>{for(const r of e)r.current=n},t)}const HY="2rem",UY=` + ${HY}`,HS=(e="0rem",t)=>`calc(${e}${t?UY:""})`;function sm({position:e,baseMargin:t}){const{navbarFloating:n,navbarTop:r}=Xe(),i=()=>e==="top"?HS(t,r):HS(t,!n&&!r);return c.jsx(WY,{size:i()})}const WY=A.div.withConfig({displayName:"NavBarSpacer__Spacing",componentId:"sc-a34116f3-0"})(["height:",";transition:height 0.2s ease-out;"],e=>e.size);function kc(e,t=!1){const[n,r]=h.useState(t);return h.useEffect(()=>{if(!window.matchMedia)return;const i=a=>{r(a.matches)},o=window.matchMedia(e);return r(o.matches),o.addEventListener("change",i),()=>o.removeEventListener("change",i)},[]),n}function VY(){const e=kc("(max-width: 950px)"),{navbarFloating:t}=Xe(),n=e&&t;return c.jsx(qY,{$elivate:n})}const qY=A.div.withConfig({displayName:"OverlapSpacer__Elivator",componentId:"sc-639400e-0"})(["height:",";",""],e=>e.$elivate?"3.5rem":"0rem",Wn("height"));function eu({helper:e,label:t,icon:n,path:r,href:i,subject:o,onClick:a}){return c.jsx(Ve,{href:i,subject:o,path:r,clean:!0,children:c.jsxs(zl,{title:e,onClick:a,children:[n&&c.jsx(GY,{children:n}),t]},t)})}const GY=A.span.withConfig({displayName:"SideBarMenuItem__SideBarIcon",componentId:"sc-7837304f-0"})(["display:flex;margin-right:0.5rem;font-size:1.5rem;"]);function KY({onItemClick:e}){const t=h.useRef(null),[n]=or(),[r,i]=h.useState(!1),[o]=Cx(),a=ae((o==null?void 0:o.subject)??Nt),s=h.useCallback(()=>{t.current&&t.current.prompt().then(u=>{u.outcome==="accepted"&&i(!1)})},[t.current]);return h.useEffect(()=>{const u=l=>{l.preventDefault(),i(!0),t.current=l};return window.addEventListener("beforeinstallprompt",u),()=>window.removeEventListener("beforeinstallprompt",u)},[]),c.jsxs("section",{"aria-label":"App menu",children:[c.jsx(eu,{icon:c.jsx(U9,{}),label:o?a.title:"Login",helper:"See and edit the current Agent / User (u)",path:Fe.agentSettings,onClick:e}),c.jsx(eu,{icon:c.jsx($x,{}),label:"Settings",helper:"Edit the theme (t)",path:Fe.themeSettings,onClick:e}),c.jsx(eu,{icon:c.jsx(oW,{}),label:"Keyboard Shortcuts",helper:"View the keyboard shortcuts (?)",path:Fe.shortcuts,onClick:e}),c.jsx(eu,{icon:c.jsx(lg,{}),label:"About",helper:"Welcome page, tells about this app",path:Fe.about,onClick:e}),r&&c.jsx(eu,{icon:c.jsx(dW,{}),label:"Install App",helper:"Install app to desktop",path:mt(n??window.location.href),onClick:s})]})}const YY=[{icon:c.jsx(OU,{}),helper:"Github; View the source code for this application",href:"https://github.com/atomicdata-dev/atomic-data-browser"},{icon:c.jsx(TU,{}),helper:"Discord; Chat with the Atomic Data community",href:"https://discord.gg/a72Rv2P"},{icon:c.jsx(N9,{}),helper:"Docs; Read the Atomic Data documentation",href:"https://docs.atomicdata.dev"}];function XY(){return c.jsx(c.Fragment,{children:c.jsx(QY,{children:YY.map(({href:e,icon:t,helper:n})=>c.jsx(Hx,{target:"_blank",rel:"noreferrer",href:e,title:n,size:"1.2em",color:"textLight",variant:Pa.Square,children:t},e))})})}const QY=A.div.withConfig({displayName:"About__AboutWrapper",componentId:"sc-17dcac24-0"})(["--inner-padding:0.5rem;display:flex;align-items:center;gap:0.5rem;margin-left:calc(1rem - var(--inner-padding));"]);function JY(){const{collection:e}=jo({property:F.properties.isA,value:F.classes.ontology});return c.jsx(ZY,{children:c.jsx(eX,{children:[...Array(e.totalMembers).keys()].map(t=>c.jsx(tX,{collection:e,index:t},t))})})}const ZY=A.div.withConfig({displayName:"OntologiesPanel__Wrapper",componentId:"sc-f25b73ed-0"})(["padding-top:0;max-height:10rem;overflow:hidden;"]),eX=A(Hs).withConfig({displayName:"OntologiesPanel__StyledScrollArea",componentId:"sc-f25b73ed-1"})(["height:10rem;overflow-x:hidden;"]);function tX({index:e,collection:t}){const n=_x(t,e),r=Fo(F.classes.ontology);return n.loading?c.jsx("div",{children:"loading"}):n.error||n.getSubject()===Nt?c.jsx(zl,{children:c.jsx(gt,{children:"Invalid Resource"})}):c.jsx(nX,{subject:n.getSubject(),clean:!0,children:c.jsx(zl,{children:c.jsxs(Le,{gap:"1ch",center:!0,children:[c.jsx(r,{}),n.title]})})})}const nX=A(Ve).withConfig({displayName:"OntologiesPanel__StyledLink",componentId:"sc-f25b73ed-2"})(["flex:1;overflow:hidden;white-space:nowrap;"]);function US({children:e,title:t}){const[n,r]=h.useState(!0);return c.jsxs(aX,{children:[c.jsx(iX,{onClick:()=>r(i=>!i),children:c.jsxs(rX,{children:[c.jsx(oX,{$open:n}),t]})}),c.jsx(dg,{open:n,children:e})]})}const rX=A.h2.withConfig({displayName:"SideBarPanel__PanelDevider",componentId:"sc-49555287-0"})(["font-size:inherit;font-weight:normal;font-family:inherit;width:100%;display:flex;align-items:center;gap:1ch;color:",";margin-bottom:0;&::before,&::after{content:'';flex:1;border-top:1px solid ",";}cursor:pointer;&:hover,&:focus{&::before,&::after{border-color:",";}}"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,e=>e.theme.colors.text),iX=A.button.withConfig({displayName:"SideBarPanel__DeviderButton",componentId:"sc-49555287-1"})(["background:none;border:none;margin:0;padding:0;"]),oX=A(Nx).withConfig({displayName:"SideBarPanel__Arrow",componentId:"sc-49555287-2"})(["transform:rotate(",");",""],e=>e.$open?"90deg":"0deg",Wn("transform")),aX=A.div.withConfig({displayName:"SideBarPanel__Wrapper",componentId:"sc-49555287-3"})(["width:100%;max-height:fit-content;display:flex;flex-direction:column;"]);var Cd;(function(e){e.Ontologies="ontologies"})(Cd||(Cd={}));const SP=()=>{const[e,t]=Di("sidebar-panels",[]),n=h.useCallback(o=>{e.includes(o)||t([...e,o])},[e,t]),r=h.useCallback(o=>{e.includes(o)&&t(e.filter(a=>a!==o))},[e,t]);return{enabledPanels:h.useMemo(()=>new Set(e),[e]),enablePanel:n,disablePanel:r}},CP=600,sX=h.memo(TY);function lX(){const{drive:e,sideBarLocked:t,setSideBarLocked:n}=Xe(),[r,i,o]=PU(),a=kc(`(min-width: ${CP}px)`,!0),{size:s,targetRef:u,dragAreaRef:l,isDragging:d}=wP({initialSize:300,minSize:200,maxSize:2e3}),{enabledPanels:f}=SP(),m=BY([r,u]),g=h.useCallback(()=>{a||n(!1)},[a]),y=t||i&&a;return c.jsxs(dX,{children:[c.jsxs(cX,{ref:m,size:s,"data-test":"sidebar",locked:a&&t,exposed:y,...o,children:[c.jsx(sm,{position:"top"}),c.jsx(sX,{handleClickItem:g},e),c.jsx(uX,{children:c.jsxs(Ne,{gap:"0.5rem",children:[f.has(Cd.Ontologies)&&c.jsx(US,{title:"Ontologies",children:c.jsx(JY,{})},e),c.jsx(US,{title:"App",children:c.jsxs(Ne,{children:[c.jsx(KY,{onItemClick:g}),c.jsx(XY,{})]})})]})}),c.jsx(VY,{}),c.jsx(sm,{baseMargin:"1rem",position:"bottom"}),c.jsx(pX,{ref:l,isDragging:d})]}),c.jsx(fX,{onClick:()=>n(!1),visible:t&&!a})]})}const cX=A.nav.attrs(e=>({style:{"--width":e.size}})).withConfig({displayName:"SideBar__SideBarStyled",componentId:"sc-41d6060e-0"})(["z-index:",";box-sizing:border-box;background:",";transition:opacity 0.3s,left 0.3s;left:",";opacity:",";height:100vh;width:var(--width);position:",";border-right:",";box-shadow:",";display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;view-transition-name:sidebar;"],e=>e.theme.zIndex.sidebar,e=>e.theme.colors.bg,e=>e.exposed?"0":"calc(var(--width) * -1 + 0.5rem)",e=>e.exposed?1:0,e=>e.locked?"relative":"absolute",e=>`1px solid ${e.theme.colors.bg2}`,e=>e.locked?"none":e.theme.boxShadowSoft),uX=A.div.withConfig({displayName:"SideBar__MenuWrapper",componentId:"sc-41d6060e-1"})(["margin-top:auto;flex-direction:column;justify-items:flex-end;display:flex;justify-content:end;"]),dX=A("div").withConfig({displayName:"SideBar__SideBarContainer",componentId:"sc-41d6060e-2"})(["position:relative;"]),fX=A.div.withConfig({displayName:"SideBar__SideBarOverlay",componentId:"sc-41d6060e-3"})(["position:absolute;left:0;top:0;bottom:0;right:0;width:100vw;transition:background-color 0.2s;background-color:",";pointer-events:",";height:100%;cursor:pointer;z-index:1;-webkit-tap-highlight-color:transparent;"],e=>e.visible?"rgba(0, 0, 0, .5)":"rgba(0, 0, 0, 0.0)",e=>e.visible?"auto":"none"),pX=A(xP).withConfig({displayName:"SideBar__SideBarDragArea",componentId:"sc-41d6060e-4"})(["--handle-margin:1rem;height:calc(100% - var(--handle-margin) * 2);margin-top:var(--handle-margin);width:12px;right:-6px;top:0;bottom:0;"]);var _P={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=["navigation","request","process","log","user","state","error","manual"],r=function(R,O,$){for(var M=$,U=0,G=R.length;U<G;U++)M=O(M,R[U],U,R);return M},i=function(R,O){return r(R,function($,M,U,G){return O(M,U,G)?$.concat(M):$},[])},o=function(R,O){return r(R,function($,M,U,G){return $===!0||M===O},!1)},a=function(R){return Object.prototype.toString.call(R)==="[object Array]"},s=!{toString:null}.propertyIsEnumerable("toString"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(R){var O=[],$;for($ in R)Object.prototype.hasOwnProperty.call(R,$)&&O.push($);if(!s)return O;for(var M=0,U=u.length;M<U;M++)Object.prototype.hasOwnProperty.call(R,u[M])&&O.push(u[M]);return O},d=function(R,O){return R===void 0&&(R=1),O===void 0&&(O=1/0),function($){return typeof $=="number"&&parseInt(""+$,10)===$&&$>=R&&$<=O}},f=function(R){return typeof R=="function"||a(R)&&i(R,function(O){return typeof O=="function"}).length===R.length},m=function(R){return typeof R=="string"&&!!R.length},g={},y=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};g.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:m},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(R){return R===void 0||m(R)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(R){return R===void 0||m(R)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(R){return R===!0||R===!1}},enabledErrorTypes:{defaultValue:function(){return y()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(R){if(typeof R!="object"||!R)return!1;var O=l(R),$=l(y());return!(i(O,function(M){return o($,M)}).length<O.length||i(l(R),function(M){return typeof R[M]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:f},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:f},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:f},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(R){return R&&typeof R=="object"&&m(R.notify)&&m(R.sessions)&&i(l(R),function(O){return!o(["notify","sessions"],O)}).length===0}},autoTrackSessions:{defaultValue:function(R){return!0},message:"should be true|false",validate:function(R){return R===!0||R===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(R){return R===null||a(R)&&i(R,function(O){return typeof O=="string"}).length===R.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(R){return typeof R=="string"&&R.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(R){return d(0,100)(R)}},enabledBreadcrumbTypes:{defaultValue:function(){return n},message:"should be null or a list of available breadcrumb types ("+n.join(",")+")",validate:function(R){return R===null||a(R)&&r(R,function(O,$){return O===!1?O:o(n,$)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(R){return R===void 0||typeof R=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(R){return R===null||R&&r(l(R),function(O,$){return O&&o(["id","email","name"],$)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(R){return typeof R=="object"&&R!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(R){return!R||R&&r(["debug","info","warn","error"],function(O,$){return O&&typeof R[$]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(R){return a(R)&&R.length===i(R,function(O){return typeof O=="string"||O&&typeof O.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(R){return a(R)&&R.length===i(R,function(O){return O&&typeof O=="object"&&typeof O.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(R){return a(R)&&R.length===i(R,function(O){return O&&typeof O=="object"&&typeof O.name=="string"}).length}}};var v=function(R){for(var O=1;O<arguments.length;O++){var $=arguments[O];for(var M in $)Object.prototype.hasOwnProperty.call($,M)&&(R[M]=$[M])}return R},_=function(R,O){return r(R,function($,M,U,G){return $.concat(O(M,U,G))},[])};function x(){return x=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var $=arguments[O];for(var M in $)Object.prototype.hasOwnProperty.call($,M)&&(R[M]=$[M])}return R},x.apply(this,arguments)}var S=g.schema,C={releaseStage:v({},S.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:x({},S.appType,{defaultValue:function(){return"browser"}}),logger:v({},S.logger,{defaultValue:function(){return typeof console<"u"&&typeof console.debug=="function"?p():void 0}})},p=function(){var R={},O=console.log;return _(["debug","info","warn","error"],function($){var M=console[$];R[$]=typeof M=="function"?M.bind(console,"[bugsnag]"):O.bind(console,"[bugsnag]")}),R},w=function(){function R($,M,U,G){G===void 0&&(G=new Date),this.type=U,this.message=$,this.metadata=M,this.timestamp=G}var O=R.prototype;return O.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},R}(),b=w,k={};(function(R,O){typeof k=="object"?k=O():R.StackFrame=O()})(this,function(){function R(he){return!isNaN(parseFloat(he))&&isFinite(he)}function O(he){return he.charAt(0).toUpperCase()+he.substring(1)}function $(he){return function(){return this[he]}}var M=["isConstructor","isEval","isNative","isToplevel"],U=["columnNumber","lineNumber"],G=["fileName","functionName","source"],Y=["args"],oe=M.concat(U,G,Y);function ee(he){if(he instanceof Object)for(var ze=0;ze<oe.length;ze++)he.hasOwnProperty(oe[ze])&&he[oe[ze]]!==void 0&&this["set"+O(oe[ze])](he[oe[ze]])}ee.prototype={getArgs:function(){return this.args},setArgs:function(he){if(Object.prototype.toString.call(he)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=he},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(he){if(he instanceof ee)this.evalOrigin=he;else if(he instanceof Object)this.evalOrigin=new ee(he);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var he=this.getFunctionName()||"{anonymous}",ze="("+(this.getArgs()||[]).join(",")+")",Ze=this.getFileName()?"@"+this.getFileName():"",Gt=R(this.getLineNumber())?":"+this.getLineNumber():"",Ae=R(this.getColumnNumber())?":"+this.getColumnNumber():"";return he+ze+Ze+Gt+Ae}};for(var we=0;we<M.length;we++)ee.prototype["get"+O(M[we])]=$(M[we]),ee.prototype["set"+O(M[we])]=function(he){return function(ze){this[he]=!!ze}}(M[we]);for(var ge=0;ge<U.length;ge++)ee.prototype["get"+O(U[ge])]=$(U[ge]),ee.prototype["set"+O(U[ge])]=function(he){return function(ze){if(!R(ze))throw new TypeError(he+" must be a Number");this[he]=Number(ze)}}(U[ge]);for(var ke=0;ke<G.length;ke++)ee.prototype["get"+O(G[ke])]=$(G[ke]),ee.prototype["set"+O(G[ke])]=function(he){return function(ze){this[he]=String(ze)}}(G[ke]);return ee});var E={};(function(R,O){typeof E=="object"?E=O(k):R.ErrorStackParser=O(R.StackFrame)})(this,function(O){var $=/(^|@)\S+\:\d+/,M=/^\s*at .*(\S+\:\d+|\(native\))/m,U=/^(eval@)?(\[native code\])?$/;return{parse:function(Y){if(typeof Y.stacktrace<"u"||typeof Y["opera#sourceloc"]<"u")return this.parseOpera(Y);if(Y.stack&&Y.stack.match(M))return this.parseV8OrIE(Y);if(Y.stack)return this.parseFFOrSafari(Y);throw new Error("Cannot parse given Error object")},extractLocation:function(Y){if(Y.indexOf(":")===-1)return[Y];var oe=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,ee=oe.exec(Y.replace(/[\(\)]/g,""));return[ee[1],ee[2]||void 0,ee[3]||void 0]},parseV8OrIE:function(Y){var oe=Y.stack.split(`
`).filter(function(ee){return!!ee.match(M)},this);return oe.map(function(ee){ee.indexOf("(eval ")>-1&&(ee=ee.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var we=ee.replace(/^\s+/,"").replace(/\(eval code/g,"("),ge=we.match(/ (\((.+):(\d+):(\d+)\)$)/);we=ge?we.replace(ge[0],""):we;var ke=we.split(/\s+/).slice(1),he=this.extractLocation(ge?ge[1]:ke.pop()),ze=ke.join(" ")||void 0,Ze=["eval","<anonymous>"].indexOf(he[0])>-1?void 0:he[0];return new O({functionName:ze,fileName:Ze,lineNumber:he[1],columnNumber:he[2],source:ee})},this)},parseFFOrSafari:function(Y){var oe=Y.stack.split(`
`).filter(function(ee){return!ee.match(U)},this);return oe.map(function(ee){if(ee.indexOf(" > eval")>-1&&(ee=ee.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),ee.indexOf("@")===-1&&ee.indexOf(":")===-1)return new O({functionName:ee});var we=/((.*".+"[^@]*)?[^@]*)(?:@)/,ge=ee.match(we),ke=ge&&ge[1]?ge[1]:void 0,he=this.extractLocation(ee.replace(we,""));return new O({functionName:ke,fileName:he[0],lineNumber:he[1],columnNumber:he[2],source:ee})},this)},parseOpera:function(Y){return!Y.stacktrace||Y.message.indexOf(`
`)>-1&&Y.message.split(`
`).length>Y.stacktrace.split(`
`).length?this.parseOpera9(Y):Y.stack?this.parseOpera11(Y):this.parseOpera10(Y)},parseOpera9:function(Y){for(var oe=/Line (\d+).*script (?:in )?(\S+)/i,ee=Y.message.split(`
`),we=[],ge=2,ke=ee.length;ge<ke;ge+=2){var he=oe.exec(ee[ge]);he&&we.push(new O({fileName:he[2],lineNumber:he[1],source:ee[ge]}))}return we},parseOpera10:function(Y){for(var oe=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,ee=Y.stacktrace.split(`
`),we=[],ge=0,ke=ee.length;ge<ke;ge+=2){var he=oe.exec(ee[ge]);he&&we.push(new O({functionName:he[3]||void 0,fileName:he[2],lineNumber:he[1],source:ee[ge]}))}return we},parseOpera11:function(Y){var oe=Y.stack.split(`
`).filter(function(ee){return!!ee.match($)&&!ee.match(/^Error created at/)},this);return oe.map(function(ee){var we=ee.split("@"),ge=this.extractLocation(we.pop()),ke=we.shift()||"",he=ke.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0,ze;ke.match(/\(([^\)]*)\)/)&&(ze=ke.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var Ze=ze===void 0||ze==="[arguments not available]"?void 0:ze.split(",");return new O({functionName:he,args:Ze,fileName:ge[0],lineNumber:ge[1],columnNumber:ge[2],source:ee})},this)}}});var I=E,j=function(R,O,$,M){var U=M&&M.redactedKeys?M.redactedKeys:[],G=M&&M.redactedPaths?M.redactedPaths:[];return JSON.stringify(se(R,U,G),O,$)},P=20,B=25e3,W=8,D="...";function L(R){return R instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(R))}function T(R){return"[Throws: "+(R?R.message:"?")+"]"}function V(R,O){for(var $=0,M=R.length;$<M;$++)if(R[$]===O)return!0;return!1}function H(R,O){for(var $=0,M=R.length;$<M;$++)if(O.indexOf(R[$])===0)return!0;return!1}function q(R,O){for(var $=0,M=R.length;$<M;$++)if(typeof R[$]=="string"&&R[$].toLowerCase()===O.toLowerCase()||R[$]&&typeof R[$].test=="function"&&R[$].test(O))return!0;return!1}function N(R){return Object.prototype.toString.call(R)==="[object Array]"}function J(R,O){try{return R[O]}catch($){return T($)}}function se(R,O,$){var M=[],U=0;function G(Y,oe){function ee(){return oe.length>W&&U>B}if(U++,oe.length>P||ee())return D;if(Y===null||typeof Y!="object")return Y;if(V(M,Y))return"[Circular]";if(M.push(Y),typeof Y.toJSON=="function")try{U--;var we=G(Y.toJSON(),oe);return M.pop(),we}catch(Ke){return T(Ke)}var ge=L(Y);if(ge){U--;var ke=G({name:Y.name,message:Y.message},oe);return M.pop(),ke}if(N(Y)){for(var he=[],ze=0,Ze=Y.length;ze<Ze;ze++){if(ee()){he.push(D);break}he.push(G(Y[ze],oe.concat("[]")))}return M.pop(),he}var Gt={};try{for(var Ae in Y)if(Object.prototype.hasOwnProperty.call(Y,Ae)){if(H($,oe.join("."))&&q(O,Ae)){Gt[Ae]="[REDACTED]";continue}if(ee()){Gt[Ae]=D;break}Gt[Ae]=G(J(Y,Ae),oe.concat(Ae))}}catch{}return M.pop(),Gt}return G(R,[])}function z(R,O,$,M){if(typeof $=="string"){M===void 0?M=null:M!==null&&typeof M!="string"&&(M=j(M));var U=O[$];if(typeof U=="number"){R[U]={name:$,variant:M};return}R.push({name:$,variant:M}),O[$]=R.length-1}}function Ce(R,O,$){if(a(O)){for(var M=0;M<O.length;++M){var U=O[M];U===null||typeof U!="object"||z(R,$,U.name,U.variant)}return R}}function Ee(R){return _(i(R,Boolean),function(O){var $=O.name,M=O.variant,U={featureFlag:$};return typeof M=="string"&&(U.variant=M),U})}function ye(R,O,$){var M=O[$];typeof M=="number"&&(R[M]=null,delete O[$])}var Re={add:z,clear:ye,merge:Ce,toEventApi:Ee},Oe=function(R){return!!R&&(!!R.stack||!!R.stacktrace||!!R["opera#sourceloc"])&&typeof(R.stack||R.stacktrace||R["opera#sourceloc"])=="string"&&R.stack!==R.name+": "+R.message},rt=Pe;function Pe(R){switch(Object.prototype.toString.call(R)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return R instanceof Error}}var zt=rt,dt=function(R,O,$,M){var U;if(O){var G;if($===null)return Tt(R,O);typeof $=="object"&&(G=$),typeof $=="string"&&(G=(U={},U[$]=M,U)),G&&(R[O]||(R[O]={}),R[O]=v({},R[O],G))}},tn=function(R,O,$){if(typeof O=="string"){if(!$)return R[O];if(R[O])return R[O][$]}},Tt=function(R,O,$){if(typeof O=="string"){if(!$){delete R[O];return}R[O]&&delete R[O][$]}},Bt={add:dt,get:tn,clear:Tt},Sn={};(function(R,O){typeof Sn=="object"?Sn=O(k):R.StackGenerator=O(R.StackFrame)})(this,function(R){return{backtrace:function($){var M=[],U=10;typeof $=="object"&&typeof $.maxStackSize=="number"&&(U=$.maxStackSize);for(var G=arguments.callee;G&&M.length<U&&G.arguments;){for(var Y=new Array(G.arguments.length),oe=0;oe<Y.length;++oe)Y[oe]=G.arguments[oe];/function(?:\s+([\w$]+))+\s*\(/.test(G.toString())?M.push(new R({functionName:RegExp.$1||void 0,args:Y})):M.push(new R({args:Y}));try{G=G.caller}catch{break}}return M}}});var un=function(){function R($,M,U,G,Y){U===void 0&&(U=[]),G===void 0&&(G=Vt()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=Y,this._handledState=G,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this.errors=[me($,M,R.__type,U)]}var O=R.prototype;return O.addMetadata=function(M,U,G){return Bt.add(this._metadata,M,U,G)},O.getMetadata=function(M,U){return Bt.get(this._metadata,M,U)},O.clearMetadata=function(M,U){return Bt.clear(this._metadata,M,U)},O.addFeatureFlag=function(M,U){U===void 0&&(U=null),Re.add(this._features,this._featuresIndex,M,U)},O.addFeatureFlags=function(M){Re.merge(this._features,M,this._featuresIndex)},O.getFeatureFlags=function(){return Re.toEventApi(this._features)},O.clearFeatureFlag=function(M){Re.clear(this._features,this._featuresIndex,M)},O.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},O.getUser=function(){return this._user},O.setUser=function(M,U,G){this._user={id:M,email:U,name:G}},O.toJSON=function(){return{payloadVersion:"4",exceptions:_(this.errors,function(M){return v({},M,{message:M.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags()}},R}(),_i=function(R){var O={file:R.fileName,method:Zr(R.functionName),lineNumber:R.lineNumber,columnNumber:R.columnNumber,code:void 0,inProject:void 0};return O.lineNumber>-1&&!O.file&&!O.method&&(O.file="global code"),O},Zr=function(R){return/^global code$/i.test(R)?"global code":R},Vt=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},ei=function(R){return typeof R=="string"?R:""};function me(R,O,$,M){return{errorClass:ei(R),errorMessage:ei(O),type:$,stacktrace:r(M,function(U,G){var Y=_i(G);try{return JSON.stringify(Y)==="{}"?U:U.concat(Y)}catch{return U}},[])}}function De(R){return R.cause?[R].concat(De(R.cause)):[R]}un.getStacktrace=function(R,O,$){if(Oe(R))return I.parse(R).slice(O);try{return i(Sn.backtrace(),function(M){return(M.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+$)}catch{return[]}},un.create=function(R,O,$,M,U,G){U===void 0&&(U=0);var Y=qt(R,O,M,G),oe=Y[0],ee=Y[1],we;try{var ge=un.getStacktrace(oe,ee>0?1+ee+U:0,1+U);we=new un(oe.name,oe.message,ge,$,R)}catch{we=new un(oe.name,oe.message,[],$,R)}if(oe.name==="InvalidError"&&we.addMetadata(""+M,"non-error parameter",St(R)),oe.cause){var ke,he=De(oe).slice(1),ze=_(he,function(Ze){var Gt=zt(Ze)&&Oe(Ze)?I.parse(Ze):[],Ae=qt(Ze,!0,"error cause"),Ke=Ae[0];return Ke.name==="InvalidError"&&we.addMetadata("error cause",St(Ze)),me(Ke.name,Ke.message,un.__type,Gt)});(ke=we.errors).push.apply(ke,ze)}return we};var St=function(R){return R===null?"null":R===void 0?"undefined":R},qt=function(R,O,$,M){var U,G=0,Y=function(oe){var ee=$==="error cause"?"was":"received";M&&M.warn($+" "+ee+' a non-error: "'+oe+'"');var we=new Error($+" "+ee+' a non-error. See "'+$+'" tab for more detail.');return we.name="InvalidError",we};if(!O)zt(R)?U=R:(U=Y(typeof R),G+=2);else switch(typeof R){case"string":case"number":case"boolean":U=new Error(String(R)),G+=1;break;case"function":U=Y("function"),G+=2;break;case"object":R!==null&&zt(R)?U=R:R!==null&&Cn(R)?(U=new Error(R.message||R.errorMessage),U.name=R.name||R.errorClass,G+=1):(U=Y(R===null?"null":"unsupported object"),G+=2);break;default:U=Y("nothing"),G+=2}if(!Oe(U))try{throw U}catch(oe){Oe(oe)&&(U=oe,G=1)}return[U,G]};un.__type="browserjs";var Cn=function(R){return(typeof R.name=="string"||typeof R.errorClass=="string")&&(typeof R.message=="string"||typeof R.errorMessage=="string")},X=un,ie=function(R,O,$){var M=0,U=function(){if(M>=R.length)return $(null,!0);O(R[M],function(G,Y){if(G)return $(G);if(Y===!1)return $(null,!1);M++,U()})};U()},_e=function(R,O,$,M){var U=function(G,Y){if(typeof G!="function")return Y(null);try{if(G.length!==2){var oe=G(O);return oe&&typeof oe.then=="function"?oe.then(function(ee){return setTimeout(function(){return Y(null,ee)})},function(ee){setTimeout(function(){return $(ee),Y(null,!0)})}):Y(null,oe)}G(O,function(ee,we){if(ee)return $(ee),Y(null);Y(null,we)})}catch(ee){$(ee),Y(null)}};ie(R,U,M)},qe=function(R,O,$,M){for(var U=!1,G=R.slice();!U&&G.length;)try{U=G.pop()(O)===!1}catch(Y){M.error("Error occurred in "+$+" callback, continuing anyway…"),M.error(Y)}return U},$e=function(O,$){var M="000000000"+O;return M.substr(M.length-$)},Ht=typeof window=="object"?window:self,_n=0;for(var kn in Ht)Object.hasOwnProperty.call(Ht,kn)&&_n++;var cr=navigator.mimeTypes?navigator.mimeTypes.length:0,kr=$e((cr+navigator.userAgent.length).toString(36)+_n.toString(36),4),at=function(){return kr},ki=0,Gn=4,Ks=36,Xt=Math.pow(Ks,Gn);function Dn(){return $e((Math.random()*Xt<<0).toString(Ks),Gn)}function Kn(){return ki=ki<Xt?ki:0,ki++,ki-1}function ji(){var R="c",O=new Date().getTime().toString(Ks),$=$e(Kn().toString(Ks),Gn),M=at(),U=Dn()+Dn();return R+O+$+M+U}ji.fingerprint=at;var ur=ji,jr=function(){function R(){this.id=ur(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var O=R.prototype;return O.getUser=function(){return this._user},O.setUser=function(M,U,G){this._user={id:M,email:U,name:G}},O.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},O._track=function(M){this[M._handledState.unhandled?"_unhandled":"_handled"]+=1},R}(),dr=jr,Wo=Re.add,Er=Re.clear,po=Re.merge,fr=function(){},Ys=function(){function R($,M,U,G){var Y=this;M===void 0&&(M=g.schema),U===void 0&&(U=[]),this._notifier=G,this._config={},this._schema=M,this._delivery={sendSession:fr,sendEvent:fr},this._logger={debug:fr,info:fr,warn:fr,error:fr},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=R,this.Event=X,this.Breadcrumb=b,this.Session=dr,this._config=this._configure($,U),_(U.concat(this._config.plugins),function(we){we&&Y._loadPlugin(we)}),this._depth=1;var oe=this,ee=this.notify;this.notify=function(){return ee.apply(oe,arguments)}}var O=R.prototype;return O.addMetadata=function(M,U,G){return Bt.add(this._metadata,M,U,G)},O.getMetadata=function(M,U){return Bt.get(this._metadata,M,U)},O.clearMetadata=function(M,U){return Bt.clear(this._metadata,M,U)},O.addFeatureFlag=function(M,U){U===void 0&&(U=null),Wo(this._features,this._featuresIndex,M,U)},O.addFeatureFlags=function(M){po(this._features,M,this._featuresIndex)},O.clearFeatureFlag=function(M){Er(this._features,this._featuresIndex,M)},O.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},O.getContext=function(){return this._context},O.setContext=function(M){this._context=M},O._configure=function(M,U){var G=r(U,function(we,ge){return ge&&ge.configSchema?v({},we,ge.configSchema):we},this._schema),Y=r(l(G),function(we,ge){var ke=G[ge].defaultValue(M[ge]);if(M[ge]!==void 0){var he=G[ge].validate(M[ge]);he?G[ge].allowPartialObject?we.config[ge]=v(ke,M[ge]):we.config[ge]=M[ge]:(we.errors[ge]=G[ge].message,we.config[ge]=ke)}else we.config[ge]=ke;return we},{errors:{},config:{}}),oe=Y.errors,ee=Y.config;if(G.apiKey){if(!ee.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(ee.apiKey)||(oe.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=v({},ee.metadata),po(this._features,ee.featureFlags,this._featuresIndex),this._user=v({},ee.user),this._context=ee.context,ee.logger&&(this._logger=ee.logger),ee.onError&&(this._cbs.e=this._cbs.e.concat(ee.onError)),ee.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(ee.onBreadcrumb)),ee.onSession&&(this._cbs.s=this._cbs.s.concat(ee.onSession)),l(oe).length&&this._logger.warn(Xs(oe,M)),ee},O.getUser=function(){return this._user},O.setUser=function(M,U,G){this._user={id:M,email:U,name:G}},O._loadPlugin=function(M){var U=M.load(this);return M.name&&(this._plugins["~"+M.name+"~"]=U),this},O.getPlugin=function(M){return this._plugins["~"+M+"~"]},O._setDelivery=function(M){this._delivery=M(this)},O.startSession=function(){var M=new dr;M.app.releaseStage=this._config.releaseStage,M.app.version=this._config.appVersion,M.app.type=this._config.appType,M._user=v({},this._user);var U=qe(this._cbs.s,M,"onSession",this._logger);return U?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,M)},O.addOnError=function(M,U){U===void 0&&(U=!1),this._cbs.e[U?"unshift":"push"](M)},O.removeOnError=function(M){this._cbs.e=i(this._cbs.e,function(U){return U!==M})},O._addOnSessionPayload=function(M){this._cbs.sp.push(M)},O.addOnSession=function(M){this._cbs.s.push(M)},O.removeOnSession=function(M){this._cbs.s=i(this._cbs.s,function(U){return U!==M})},O.addOnBreadcrumb=function(M,U){U===void 0&&(U=!1),this._cbs.b[U?"unshift":"push"](M)},O.removeOnBreadcrumb=function(M){this._cbs.b=i(this._cbs.b,function(U){return U!==M})},O.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},O.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},O.leaveBreadcrumb=function(M,U,G){if(M=typeof M=="string"?M:"",G=typeof G=="string"&&o(n,G)?G:"manual",U=typeof U=="object"&&U!==null?U:{},!!M){var Y=new b(M,U,G),oe=qe(this._cbs.b,Y,"onBreadcrumb",this._logger);if(oe){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(Y),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},O._isBreadcrumbTypeEnabled=function(M){var U=this._config.enabledBreadcrumbTypes;return U===null||o(U,M)},O.notify=function(M,U,G){G===void 0&&(G=fr);var Y=X.create(M,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(Y,U,G)},O._notify=function(M,U,G){var Y=this;if(G===void 0&&(G=fr),M.app=v({},M.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),M.context=M.context||this._context,M._metadata=v({},M._metadata,this._metadata),M._user=v({},M._user,this._user),M.breadcrumbs=this._breadcrumbs.slice(),po(M._features,this._features,M._featuresIndex),this._config.enabledReleaseStages!==null&&!o(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),G(null,M);var oe=M.severity,ee=function(ge){Y._logger.error("Error occurred in onError callback, continuing anyway…"),Y._logger.error(ge)},we=[].concat(this._cbs.e).concat(U);_e(we,M,ee,function(ge,ke){if(ge&&ee(ge),!ke)return Y._logger.debug("Event not sent due to onError callback"),G(null,M);Y._isBreadcrumbTypeEnabled("error")&&R.prototype.leaveBreadcrumb.call(Y,M.errors[0].errorClass,{errorClass:M.errors[0].errorClass,errorMessage:M.errors[0].errorMessage,severity:M.severity},"error"),oe!==M.severity&&(M._handledState.severityReason={type:"userCallbackSetSeverity"}),M.unhandled!==M._handledState.unhandled&&(M._handledState.severityReason.unhandledOverridden=!0,M._handledState.unhandled=M.unhandled),Y._session&&(Y._session._track(M),M._session=Y._session),Y._delivery.sendEvent({apiKey:M.apiKey||Y._config.apiKey,notifier:Y._notifier,events:[M]},function(he){return G(he,M)})})},R}(),Xs=function(R,O){var $=new Error(`Invalid configuration
`+_(l(R),function(M){return" - "+M+" "+R[M]+", got "+hf(O[M])}).join(`
`));return $},hf=function(R){switch(typeof R){case"string":case"number":case"object":return JSON.stringify(R);default:return String(R)}},ho=Ys,ti={},Qs=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];ti.event=function(R,O){var $=j(R,null,null,{redactedPaths:Qs,redactedKeys:O});return $.length>1e6&&(R.events[0]._metadata={notifier:`WARNING!
Serialized payload was `+$.length/1e6+`MB (limit = 1MB)
metadata was removed`},$=j(R,null,null,{redactedPaths:Qs,redactedKeys:O})),$},ti.session=function(R,O){var $=j(R,null,null);return $};var M0={};M0=function(R,O){return O===void 0&&(O=window),{sendEvent:function($,M){M===void 0&&(M=function(){});var U=A4(R._config,"notify","4",O),G=ti.event($,R._config.redactedKeys),Y=new O.XDomainRequest;Y.onload=function(){M(null)},Y.onerror=function(){var oe=new Error("Event failed to send");R._logger.error("Event failed to send…",oe),G.length>1e6&&R._logger.warn("Event oversized ("+(G.length/1e6).toFixed(2)+" MB)"),M(oe)},Y.open("POST",U),setTimeout(function(){try{Y.send(G)}catch(oe){R._logger.error(oe),M(oe)}},0)},sendSession:function($,M){M===void 0&&(M=function(){});var U=A4(R._config,"sessions","1",O),G=new O.XDomainRequest;G.onload=function(){M(null)},G.open("POST",U),setTimeout(function(){try{G.send(ti.session($,R._config.redactedKeys))}catch(Y){R._logger.error(Y),M(Y)}},0)}}};var A4=function(R,O,$,M){var U=JSON.parse(JSON.stringify(new Date)),G=PD(R.endpoints[O],M.location.protocol);return G+"?apiKey="+encodeURIComponent(R.apiKey)+"&payloadVersion="+$+"&sentAt="+encodeURIComponent(U)},PD=M0._matchPageProtocol=function(R,O){return O==="http:"?R.replace(/^https:/,"http:"):R},AD=function(R,O){return O===void 0&&(O=window),{sendEvent:function($,M){M===void 0&&(M=function(){});try{var U=R._config.endpoints.notify,G=new O.XMLHttpRequest,Y=ti.event($,R._config.redactedKeys);G.onreadystatechange=function(){if(G.readyState===O.XMLHttpRequest.DONE){var oe=G.status;if(oe===0||oe>=400){var ee=new Error("Request failed with status "+oe);R._logger.error("Event failed to send…",ee),Y.length>1e6&&R._logger.warn("Event oversized ("+(Y.length/1e6).toFixed(2)+" MB)"),M(ee)}else M(null)}},G.open("POST",U),G.setRequestHeader("Content-Type","application/json"),G.setRequestHeader("Bugsnag-Api-Key",$.apiKey||R._config.apiKey),G.setRequestHeader("Bugsnag-Payload-Version","4"),G.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),G.send(Y)}catch(oe){R._logger.error(oe)}},sendSession:function($,M){M===void 0&&(M=function(){});try{var U=R._config.endpoints.sessions,G=new O.XMLHttpRequest;G.onreadystatechange=function(){if(G.readyState===O.XMLHttpRequest.DONE){var Y=G.status;if(Y===0||Y>=400){var oe=new Error("Request failed with status "+Y);R._logger.error("Session failed to send…",oe),M(oe)}else M(null)}},G.open("POST",U),G.setRequestHeader("Content-Type","application/json"),G.setRequestHeader("Bugsnag-Api-Key",R._config.apiKey),G.setRequestHeader("Bugsnag-Payload-Version","1"),G.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),G.send(ti.session($,R._config.redactedKeys))}catch(Y){R._logger.error(Y)}}}},I4=new Date,ID=function(){I4=new Date},TD={name:"appDuration",load:function(R){return R.addOnError(function(O){var $=new Date;O.app.duration=$-I4},!0),{reset:ID}}},OD=function(R){return R===void 0&&(R=window),{load:function(O){O.addOnError(function($){$.context===void 0&&($.context=R.location.pathname)},!0)}}},$0=function(O,$){var M="000000000"+O;return M.substr(M.length-$)},T4=typeof window=="object"?window:self,O4=0;for(var DD in T4)Object.hasOwnProperty.call(T4,DD)&&O4++;var ND=navigator.mimeTypes?navigator.mimeTypes.length:0,MD=$0((ND+navigator.userAgent.length).toString(36)+O4.toString(36),4),D4=function(){return MD},zc=0,L0=4,mf=36,N4=Math.pow(mf,L0);function M4(){return $0((Math.random()*N4<<0).toString(mf),L0)}function $D(){return zc=zc<N4?zc:0,zc++,zc-1}function $4(){var R="c",O=new Date().getTime().toString(mf),$=$0($D().toString(mf),L0),M=D4(),U=M4()+M4();return R+O+$+M+U}$4.fingerprint=D4;var LD=$4,L4="bugsnag-anonymous-id",FD=function(R){try{var O=R.localStorage,$=O.getItem(L4);return $&&/^c[a-z0-9]{20,32}$/.test($)||($=LD(),O.setItem(L4,$)),$}catch{}},zD=function(R,O){return R===void 0&&(R=navigator),O===void 0&&(O=window),{load:function($){var M={locale:R.browserLanguage||R.systemLanguage||R.userLanguage||R.language,userAgent:R.userAgent};O&&O.screen&&O.screen.orientation&&O.screen.orientation.type?M.orientation=O.screen.orientation.type:O&&O.document&&(M.orientation=O.document.documentElement.clientWidth>O.document.documentElement.clientHeight?"landscape":"portrait"),$._config.generateAnonymousId&&(M.id=FD(O)),$.addOnSession(function(U){U.device=v({},U.device,M),$._config.collectUserIp||F4(U)}),$.addOnError(function(U){U.device=v({},U.device,M,{time:new Date}),$._config.collectUserIp||F4(U)},!0)},configSchema:{generateAnonymousId:{validate:function($){return $===!0||$===!1},defaultValue:function(){return!0},message:"should be true|false"}}}},F4=function(R){var O=R.getUser();(!O||!O.id)&&R.setUser(R.device.id)},BD=function(R){return R===void 0&&(R=window),{load:function(O){O.addOnError(function($){$.request&&$.request.url||($.request=v({},$.request,{url:R.location.href}))},!0)}}},HD={load:function(R){R._sessionDelegate=UD}},UD={startSession:function(R,O){var $=R;return $._session=O,$._pausedSession=null,$._config.enabledReleaseStages!==null&&!o($._config.enabledReleaseStages,$._config.releaseStage)?($._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),$):($._delivery.sendSession({notifier:$._notifier,device:O.device,app:O.app,sessions:[{id:O.id,startedAt:O.startedAt,user:O._user}]}),$)},resumeSession:function(R){return R._session?R:R._pausedSession?(R._session=R._pausedSession,R._pausedSession=null,R):R.startSession()},pauseSession:function(R){R._pausedSession=R._session,R._session=null}},WD={load:function(R){R._config.collectUserIp||R.addOnError(function(O){O._user&&typeof O._user.id>"u"&&delete O._user.id,O._user=v({id:"[REDACTED]"},O._user),O.request=v({clientIp:"[REDACTED]"},O.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(R){return R===!0||R===!1}}}},z4={};z4.load=function(R){var O=/^(local-)?dev(elopment)?$/.test(R._config.releaseStage);O||!R._isBreadcrumbTypeEnabled("log")||_(VD,function($){var M=console[$];console[$]=function(){for(var U=arguments.length,G=new Array(U),Y=0;Y<U;Y++)G[Y]=arguments[Y];R.leaveBreadcrumb("Console output",r(G,function(oe,ee,we){var ge="[Unknown value]";try{ge=String(ee)}catch{}if(ge==="[object Object]")try{ge=JSON.stringify(ee)}catch{}return oe["["+we+"]"]=ge,oe},{severity:$.indexOf("group")===0?"log":$}),"log"),M.apply(console,G)},console[$]._restore=function(){console[$]=M}})};var VD=i(["log","debug","info","warn","error"],function(R){return typeof console<"u"&&typeof console[R]=="function"}),B4=200,H4=5e5,qD=function(R,O){return R===void 0&&(R=document),O===void 0&&(O=window),{load:function($){if(!$._config.trackInlineScripts)return;var M=O.location.href,U="",G=!!R.attachEvent,Y=G?R.readyState==="complete":R.readyState!=="loading",oe=function(){return R.documentElement.outerHTML};U=oe();var ee=R.onreadystatechange;R.onreadystatechange=function(){R.readyState==="interactive"&&(U=oe(),Y=!0);try{ee.apply(this,arguments)}catch{}};var we=null,ge=function(Ae){we=Ae},ke=function(){var Ae=R.currentScript||we;if(!Ae&&!Y){var Ke=R.scripts||R.getElementsByTagName("script");Ae=Ke[Ke.length-1]}return Ae},he=function(Ae){(!Y||!U)&&(U=oe());var Ke=["<!-- DOC START -->"].concat(U.split(`
`)),jn=Ae-1,nn=Math.max(jn-3,0),ni=Math.min(jn+3,Ke.length);return r(Ke.slice(nn,ni),function(Ei,Bc,H0){return Ei[nn+1+H0]=Bc.length<=B4?Bc:Bc.substr(0,B4),Ei},{})};$.addOnError(function(Ae){Ae.errors[0].stacktrace=i(Ae.errors[0].stacktrace,function(ni){return!/__trace__$/.test(ni.method)});var Ke=Ae.errors[0].stacktrace[0];if(!(Ke&&Ke.file&&Ke.file.replace(/#.*$/,"")!==M.replace(/#.*$/,""))){var jn=ke();if(jn){var nn=jn.innerHTML;Ae.addMetadata("script","content",nn.length<=H4?nn:nn.substr(0,H4)),Ke&&Ke.lineNumber&&(Ke.code=he(Ke.lineNumber))}}},!0);var ze=_(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(Ae){return F0(O,Ae,function(Ke){return Gt(Ke,function(jn){return{get:function(){return jn[0]},replace:function(nn){jn[0]=nn}}})})}),Ze=ze[0];_(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],function(Ae){!O[Ae]||!O[Ae].prototype||!Object.prototype.hasOwnProperty.call(O[Ae].prototype,"addEventListener")||(F0(O[Ae].prototype,"addEventListener",function(Ke){return Gt(Ke,U4)}),F0(O[Ae].prototype,"removeEventListener",function(Ke){return Gt(Ke,U4,!0)}))});function Gt(Ae,Ke,jn){return jn===void 0&&(jn=!1),function(){var nn=[].slice.call(arguments);try{var ni=Ke(nn),Ei=ni.get();if(jn&&Ae.apply(this,nn),typeof Ei!="function")return Ae.apply(this,nn);if(Ei.__trace__)ni.replace(Ei.__trace__);else{var Bc=ke();Ei.__trace__=function(){ge(Bc),Ze(function(){ge(null)},0);var lN=Ei.apply(this,arguments);return ge(null),lN},Ei.__trace__.__trace__=Ei.__trace__,ni.replace(Ei.__trace__)}}catch{}if(Ae.apply)return Ae.apply(this,nn);switch(nn.length){case 1:return Ae(nn[0]);case 2:return Ae(nn[0],nn[1]);default:return Ae()}}}},configSchema:{trackInlineScripts:{validate:function($){return $===!0||$===!1},defaultValue:function(){return!0},message:"should be true|false"}}}};function F0(R,O,$){var M=R[O];if(!M)return M;var U=$(M);return R[O]=U,M}function U4(R){var O=!!R[1]&&typeof R[1].handleEvent=="function";return{get:function(){return O?R[1].handleEvent:R[1]},replace:function($){O?R[1].handleEvent=$:R[1]=$}}}var GD=function(R){return R===void 0&&(R=window),{load:function(O){"addEventListener"in R&&O._isBreadcrumbTypeEnabled("user")&&R.addEventListener("click",function($){var M,U;try{M=XD($.target),U=W4($.target,R)}catch{M="[hidden]",U="[hidden]",O._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}O.leaveBreadcrumb("UI click",{targetText:M,targetSelector:U},"user")},!0)}}},KD=/^\s+/,YD=/(^|[^\s])\s+$/;function XD(R){var O=R.textContent||R.innerText||"";return!O&&(R.type==="submit"||R.type==="button")&&(O=R.value),O=O.replace(KD,"").replace(YD,"$1"),O.length>140?O.slice(0,135)+"(...)":O}function W4(R,O){var $=[R.tagName];if(R.id&&$.push("#"+R.id),R.className&&R.className.length&&$.push("."+R.className.split(" ").join(".")),!O.document.querySelectorAll||!Array.prototype.indexOf)return $.join("");try{if(O.document.querySelectorAll($.join("")).length===1)return $.join("")}catch{return $.join("")}if(R.parentNode.childNodes.length>1){var M=Array.prototype.indexOf.call(R.parentNode.childNodes,R)+1;$.push(":nth-child("+M+")")}return O.document.querySelectorAll($.join("")).length===1?$.join(""):R.parentNode?W4(R.parentNode,O)+" > "+$.join(""):$.join("")}var V4={};V4=function(R){R===void 0&&(R=window);var O={load:function($){if("addEventListener"in R&&$._isBreadcrumbTypeEnabled("navigation")){var M=function(U){return function(){return $.leaveBreadcrumb(U,{},"navigation")}};R.addEventListener("pagehide",M("Page hidden"),!0),R.addEventListener("pageshow",M("Page shown"),!0),R.addEventListener("load",M("Page loaded"),!0),R.document.addEventListener("DOMContentLoaded",M("DOMContentLoaded"),!0),R.addEventListener("load",function(){return R.addEventListener("popstate",M("Navigated back"),!0)}),R.addEventListener("hashchange",function(U){var G=U.oldURL?{from:gf(U.oldURL,R),to:gf(U.newURL,R),state:G4(R)}:{to:gf(R.location.href,R)};$.leaveBreadcrumb("Hash changed",G,"navigation")},!0),R.history.replaceState&&q4($,R.history,"replaceState",R),R.history.pushState&&q4($,R.history,"pushState",R)}}};return O};var gf=function(R,O){var $=O.document.createElement("A");return $.href=R,""+$.pathname+$.search+$.hash},QD=function(R,O,$,M){var U=gf(R.location.href,R);return{title:$,state:O,prevState:G4(R),to:M||U,from:U}},q4=function(R,O,$,M){var U=O[$];O[$]=function(G,Y,oe){R.leaveBreadcrumb("History "+$,QD(M,G,Y,oe),"navigation"),typeof R.resetEventCount=="function"&&R.resetEventCount(),R._config.autoTrackSessions&&R.startSession(),U.apply(O,[G,Y].concat(oe!==void 0?oe:[]))}},G4=function(R){try{return R.history.state}catch{}},Js="request",JD=function(R,O){R===void 0&&(R=[]),O===void 0&&(O=window);var $={load:function(M){if(!M._isBreadcrumbTypeEnabled("request"))return;var U=[M._config.endpoints.notify,M._config.endpoints.sessions].concat(R);G(),ee();function G(){if("addEventListener"in O.XMLHttpRequest.prototype){var ke=O.XMLHttpRequest.prototype.open;O.XMLHttpRequest.prototype.open=function(ze,Ze){var Gt=this,Ae=!1,Ke=function(){return oe(ze,Ze)},jn=function(){return Y(ze,Ze,Gt.status)};Ae&&(this.removeEventListener("load",jn),this.removeEventListener("error",Ke)),this.addEventListener("load",jn),this.addEventListener("error",Ke),Ae=!0,ke.apply(this,arguments)}}}function Y(ke,he,ze){if(he===void 0){M._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!(typeof he=="string"&&o(U,he.replace(/\?.*$/,"")))){var Ze={status:ze,request:ke+" "+he};ze>=400?M.leaveBreadcrumb("XMLHttpRequest failed",Ze,Js):M.leaveBreadcrumb("XMLHttpRequest succeeded",Ze,Js)}}function oe(ke,he){if(he===void 0){M._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}typeof he=="string"&&o(U,he.replace(/\?.*$/,""))||M.leaveBreadcrumb("XMLHttpRequest error",{request:ke+" "+he},Js)}function ee(){if(!(!("fetch"in O)||O.fetch.polyfill)){var ke=O.fetch;O.fetch=function(){var ze=arguments,Ze=arguments[0],Gt=arguments[1],Ae,Ke=null;return Ze&&typeof Ze=="object"?(Ke=Ze.url,Gt&&"method"in Gt?Ae=Gt.method:Ze&&"method"in Ze&&(Ae=Ze.method)):(Ke=Ze,Gt&&"method"in Gt&&(Ae=Gt.method)),Ae===void 0&&(Ae="GET"),new Promise(function(jn,nn){ke.apply(void 0,ze).then(function(ni){we(ni,Ae,Ke),jn(ni)}).catch(function(ni){ge(Ae,Ke),nn(ni)})})}}}var we=function(ke,he,ze){var Ze={status:ke.status,request:he+" "+ze};ke.status>=400?M.leaveBreadcrumb("fetch() failed",Ze,Js):M.leaveBreadcrumb("fetch() succeeded",Ze,Js)},ge=function(ke,he){M.leaveBreadcrumb("fetch() error",{request:ke+" "+he},Js)}}};return $},ZD={load:function(R){var O=0;R.addOnError(function($){if(O>=R._config.maxEvents)return R._logger.warn("Cancelling event send due to maxEvents per session limit of "+R._config.maxEvents+" being reached"),!1;O++}),R.resetEventCount=function(){O=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(R){return d(1,100)(R)}}}},z0={};z0={load:function(R){R.addOnError(function(O){var $=r(O.errors,function(M,U){return M.concat(U.stacktrace)},[]);_($,function(M){M.file=eN(M.file)})})}};var eN=z0._strip=function(R){return typeof R=="string"?R.replace(/\?.*$/,"").replace(/#.*$/,""):R},tN=function(R,O){return R===void 0&&(R=window),O===void 0&&(O="window onerror"),{load:function($){if(!$._config.autoDetectErrors||!$._config.enabledErrorTypes.unhandledExceptions)return;function M(G,Y,oe,ee,we){if(oe===0&&/Script error\.?/.test(G))$._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var ge={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},ke;if(we)ke=$.Event.create(we,!0,ge,O,1),K4(ke.errors[0].stacktrace,Y,oe,ee);else if(typeof G=="object"&&G!==null&&(!Y||typeof Y!="string")&&!oe&&!ee&&!we){var he=G.type?"Event: "+G.type:"Error",ze=G.message||G.detail||"";ke=$.Event.create({name:he,message:ze},!0,ge,O,1),ke.originalError=G,ke.addMetadata(O,{event:G,extraParameters:Y})}else ke=$.Event.create(G,!0,ge,O,1),K4(ke.errors[0].stacktrace,Y,oe,ee);$._notify(ke)}typeof U=="function"&&U.apply(this,arguments)}var U=R.onerror;R.onerror=M}}},K4=function(R,O,$,M){R[0]||R.push({});var U=R[0];!U.file&&typeof O=="string"&&(U.file=O),!U.lineNumber&&B0($)&&(U.lineNumber=$),U.columnNumber||(B0(M)?U.columnNumber=M:window.event&&B0(window.event.errorCharacter)&&(U.columnNumber=window.event.errorCharacter))},B0=function(R){return typeof R=="number"&&String.call(R)!=="NaN"},nN=function(R){R===void 0&&(R=window);var O={load:function($){if(!(!$._config.autoDetectErrors||!$._config.enabledErrorTypes.unhandledRejections)){var M=function(U){var G=U.reason,Y=!1;try{U.detail&&U.detail.reason&&(G=U.detail.reason,Y=!0)}catch{}var oe=$.Event.create(G,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,$._logger);Y&&_(oe.errors[0].stacktrace,rN(G)),$._notify(oe,function(ee){if(zt(ee.originalError)&&!ee.originalError.stack){var we;ee.addMetadata("unhandledRejection handler",(we={},we[Object.prototype.toString.call(ee.originalError)]={name:ee.originalError.name,message:ee.originalError.message,code:ee.originalError.code},we))}})};"addEventListener"in R?R.addEventListener("unhandledrejection",M):R.onunhandledrejection=function(U,G){M({detail:{reason:U,promise:G}})}}}};return O},rN=function(R){return function(O){O.file!==R.toString()&&O.method&&(O.method=O.method.replace(/^\s+/,""))}},Ka={},iN="Bugsnag JavaScript",oN="7.20.0",aN="https://github.com/bugsnag/bugsnag-js",sN=v({},g.schema,C),Yn={_client:null,createClient:function(R){typeof R=="string"&&(R={apiKey:R}),R||(R={});var O=[TD,zD(),OD(),BD(),ZD,HD,WD,z0,tN(),nN(),V4(),GD(),JD(),z4,qD()],$=new ho(R,sN,O,{name:iN,version:oN,url:aN});return $._setDelivery(window.XDomainRequest?M0:AD),$._logger.debug("Loaded!"),$.leaveBreadcrumb("Bugsnag loaded",{},"state"),$._config.autoTrackSessions?$.startSession():$},start:function(R){return Yn._client?(Yn._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),Yn._client):(Yn._client=Yn.createClient(R),Yn._client)},isStarted:function(){return Yn._client!=null}};return _(["resetEventCount"].concat(l(ho.prototype)),function(R){/^_/.test(R)||(Yn[R]=function(){if(!Yn._client)return console.log("Bugsnag."+R+"() was called before Bugsnag.start()");Yn._client._depth+=1;var O=Yn._client[R].apply(Yn._client,arguments);return Yn._client._depth-=1,O})}),Ka=Yn,Ka.Client=ho,Ka.Event=X,Ka.Session=dr,Ka.Breadcrumb=b,Ka.default=Yn,Ka})})(_P);var hX=_P.exports,mX=hX;const o2=nr(mX);var kP={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n={};function r(){return r=Object.assign||function(l){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(l[m]=f[m])}return l},r.apply(this,arguments)}function i(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function o(l,d){l.prototype=Object.create(d.prototype),l.prototype.constructor=l,a(l,d)}function a(l,d){return a=Object.setPrototypeOf||function(m,g){return m.__proto__=g,m},a(l,d)}n=function(){function l(){var f=typeof window<"u"&&window.React;if(this.name="react",this.lazy=arguments.length===0&&!f,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||f,!this.React))throw new Error("@bugsnag/plugin-react reference to `React` was undefined")}var d=l.prototype;return d.load=function(m){if(!this.lazy){var g=u(this.React,m);return g.createErrorBoundary=function(){return g},g}var y=function(){throw new Error(`@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:
Pass React to the plugin constructor
\`Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })\`
and then call \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()\`
Or if React is not available until after Bugsnag has started,
construct the plugin with no arguments
\`Bugsnag.start({ plugins: [new BugsnagPluginReact()] })\`,
then pass in React when available to construct your error boundary
\`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)\``)};return y.createErrorBoundary=function(v){if(!v)throw new Error("@bugsnag/plugin-react reference to `React` was undefined");return u(v,m)},y},l}();var s=function(l){for(var d=l.split(/\s*\n\s*/g),f="",m=0,g=d.length;m<g;m++)d[m].length&&(f+=(f.length?`
`:"")+d[m]);return f},u=function(l,d){return function(f){o(m,f);function m(y){var v;return v=f.call(this,y)||this,v.state={error:null,info:null},v.handleClearError=v.handleClearError.bind(i(v)),v}var g=m.prototype;return g.handleClearError=function(){this.setState({error:null,info:null})},g.componentDidCatch=function(v,_){var x=this.props.onError,S={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},C=d.Event.create(v,!0,S,1);_&&_.componentStack&&(_.componentStack=s(_.componentStack)),C.addMetadata("react",_),d._notify(C,x),this.setState({error:v,info:_})},g.render=function(){var v=this.state.error;if(v){var _=this.props.FallbackComponent;return _?l.createElement(_,r({},this.state,{clearError:this.handleClearError})):null}return this.props.children},m}(l.Component)};return n.formatComponentStack=s,n.default=n,n})})(kP);var gX=kP.exports;const vX=nr(gX);function jP(e){console.error(e),aP||o2.notify(e)}function yX(e){return o2.start({apiKey:e,plugins:[new vX],releaseStage:"production",enabledReleaseStages:["production"],autoDetectErrors:!aP()}),o2.getPlugin("react").createErrorBoundary(le)}const bX=e=>{const[t,n,r]=FH(),[i,o]=Di("mainColor","#1b50d8"),[a,s]=Di("navbarTop",!1),[u,l]=Di("viewTransitionsEnabled",!0),[d,f]=Di("navbarFloating",!0),[m,g]=Di("sideBarOpen",window.innerWidth>CP),[y,v]=Cx(),[_,x]=Xm(),[S,C]=Di("drive",_),p=h.useCallback(k=>{const E=new URL(k);C(k),x(E.origin)},[C,x]),w=h.useCallback(k=>{try{v(k),k!=null&&k.subject&<.success("Signed in!"),k===void 0&<.success("Signed out.")}catch(E){jP(new Error("Agent setting failed: "+E.message))}},[v]),b=h.useMemo(()=>({drive:S,setDrive:p,darkMode:t,darkModeSetting:r,setDarkMode:n,mainColor:i,setMainColor:o,navbarTop:a,setNavbarTop:s,navbarFloating:d,setNavbarFloating:f,sideBarLocked:m,setSideBarLocked:g,agent:y,setAgent:w,viewTransitionsEnabled:u,setViewTransitionsEnabled:l}),[S,p,t,r,n,i,o,a,s,d,f,m,g,y,w,u,l]);return c.jsx(y3.Provider,{value:b,children:e.children})},wX={darkMode:!1,darkModeSetting:Fl.auto,setDarkMode:()=>{},mainColor:"",setMainColor:()=>{},drive:"",setDrive:()=>{},navbarTop:!1,setNavbarTop:()=>{},navbarFloating:!1,setNavbarFloating:()=>{},sideBarLocked:!1,setSideBarLocked:()=>{},agent:void 0,setAgent:()=>{},viewTransitionsEnabled:!0,setViewTransitionsEnabled:()=>{}},Xe=()=>h.useContext(y3),y3=h.createContext(wX),xX=({children:e})=>{const{mainColor:t,darkMode:n}=h.useContext(y3);return c.jsx(c.Fragment,{children:c.jsx(iH,{theme:CX(n,t),children:e},t)})},EP={sidebar:10,dialog:100,dropdown:200,networkIndicator:300,toast:400},RP=100,WS="2.2rem",SX="4.2rem",CX=(e,t)=>{const n=e?Ii(.2,t):t,r=e?"#000000":"#ffffff",i=e?"#fff":"#000",o=e?"rgba(255,255,255,.15)":"rgba(0,0,0,0.07)",a=e?"rgba(255,255,255,.3)":"rgba(0,0,0,0.2)";return{darkMode:e,fontFamilyHeader:"'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",fontFamily:"'Open Sans', 'Helvetica Neue', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",boxShadow:`0 0 10px 0px ${o}`,boxShadowIntense:`0 0 22px 0px ${a}`,boxShadowSoft:`0px 1.5px 2.2px rgba(0, 0, 0, 0.02),
0px 3.5px 5.3px rgba(0, 0, 0, 0.028), 0px 6.6px 10px rgba(0, 0, 0, 0.035),
0px 11.8px 17.9px rgba(0, 0, 0, 0.042),
0px 22.1px 33.4px rgba(0, 0, 0, 0.05), 0px 53px 80px rgba(0, 0, 0, 0.07);`,containerWidth:40,containerWidthWide:"900px",fontSizeBody:1,fontSizeH1:2,sideBarWidth:15,margin:1,radius:"9px",heights:{breadCrumbBar:WS,floatingSearchBarPadding:SX,fullPage:`calc(100% - ${WS})`},colors:{main:n,mainLight:Ii(.08)(n),mainDark:bo(.08)(n),bg:r,bgBody:e?r:bo(.02)(r),bg1:e?Ii(.1)(r):bo(.05)(r),bg2:e?Ii(.3)(r):bo(.2)(r),text:i,text1:e?bo(.1)(i):Ii(.1)(i),textLight:e?bo(.4)(i):Ii(.4)(i),textLight2:e?bo(.8)(i):Ii(.8)(i),alert:"#cf5b5b",alertLight:"#e66f6f"},animation:{duration:`${RP}ms`},zIndex:EP}},_X=sH([":root{--view-transition-duration:150ms;}*{box-sizing:border-box;scrollbar-color:"," ",";&::-webkit-scrollbar{width:10px;height:10px;padding:3px;background-color:",";}&::-webkit-scrollbar-thumb{width:8px;margin:auto;background-color:",";border-radius:",";&:hover{background-color:",";}}}body{background-color:",";color:",";font-family:",";line-height:1.5em;word-wrap:break-word;overflow-wrap:anywhere;margin:0;transition:background .2s ease,border-color .2s ease,color .2s ease;font-size:15px;}input,button,body{overflow-wrap:normal;}a{color:",";}h1{font-size:","rem;}h2{font-size:1.7rem;}h1,h2,h3,h4,h5,h6{margin-bottom:","rem;font-weight:bold;font-family:",";line-height:1em;margin-top:0;word-break:break-word;}i{font-style:italic;}p{margin-top:0;margin-bottom:","rem;}ul{margin-top:0;margin-bottom:","rem;padding:0;li{list-style-type:disc;margin-left:","rem;margin-bottom:","rem;}}code{background-color:",";padding:0rem 0.2rem;font-family:Monaco,monospace;font-size:.8em;display:inline-flex;white-space:nowrap;overflow:auto;max-width:100%;}b{font-weight:bold;}::view-transition-old(*),::view-transition-new(*){animation-duration:var(--view-transition-duration);}::view-transition-old(root),::view-transition-new(root){animation-duration:0ms;}@keyframes slide-in-from-right{from{transform:translateX(5rem);opacity:0;}to{transform:translateX(0);opacity:1;}}::view-transition-image-pair(download-button){mix-blend-mode:normal;}::view-transition-old(download-button):only-child,::view-transition-new(download-button):only-child{animation:slide-in-from-right var(--view-transition-duration) ease-in-out;animation-fill-mode:both;}::view-transition-old(download-button):only-child{animation-direction:reverse;}::view-transition-group(navbar){z-index:10;}@media (prefers-reduced-motion){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important;}}@keyframes toast-enter{0%{left:110%;}100%{left:0;}}@keyframes toast-exit{0%{left:0;}100%{left:110%;}}"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>bo(.1)(e.theme.colors.bg2),e=>e.theme.colors.bgBody,e=>e.theme.colors.text,e=>e.theme.fontFamily,e=>e.theme.colors.main,e=>e.theme.fontSizeH1,e=>e.theme.margin,e=>e.theme.fontFamilyHeader,e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.margin*2,e=>e.theme.margin/2,e=>e.theme.colors.bg1),Et=A.div.withConfig({displayName:"Containers__ContainerNarrow",componentId:"sc-2050a54a-0"})(["width:min(100%,","rem);margin:auto;padding:","rem;padding-bottom:10rem;"],e=>e.theme.containerWidth,e=>e.theme.margin),Is=A.div.withConfig({displayName:"Containers__ContainerWide",componentId:"sc-2050a54a-1"})(["width:min(100%,",");margin:auto;padding:","rem;padding-bottom:10rem;"],e=>e.theme.containerWidthWide,e=>e.theme.margin),_d=A.div.withConfig({displayName:"Containers__ContainerFull",componentId:"sc-2050a54a-2"})(["padding:","rem;padding-bottom:10rem;"],e=>e.theme.margin),kX=()=>{const[e,t]=h.useState(window.innerWidth);return h.useEffect(()=>{const n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},VS=["http","https","mailto","tel"];function jX(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<VS.length;){const o=VS[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var EX=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const PP=nr(EX);function Du(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qS(e.position):"start"in e||"end"in e?qS(e):"line"in e||"column"in e?a2(e):""}function a2(e){return GS(e&&e.line)+":"+GS(e&&e.column)}function qS(e){return a2(e&&e.start)+"-"+a2(e&&e.end)}function GS(e){return e&&typeof e=="number"?e:1}class xi extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const a=r.indexOf(":");a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=Du(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}xi.prototype.file="";xi.prototype.name="";xi.prototype.reason="";xi.prototype.message="";xi.prototype.stack="";xi.prototype.fatal=null;xi.prototype.column=null;xi.prototype.line=null;xi.prototype.source=null;xi.prototype.ruleId=null;xi.prototype.position=null;const Qi={basename:RX,dirname:PX,extname:AX,join:IX,sep:"/"};function RX(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rf(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function PX(e){if(rf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function AX(e){rf(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.charCodeAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function IX(...e){let t=-1,n;for(;++t<e.length;)rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":TX(n)}function TX(e){rf(e);const t=e.charCodeAt(0)===47;let n=OX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function OX(e,t){let n="",r=0,i=-1,o=0,a=-1,s,u;for(;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const DX={cwd:NX};function NX(){return"/"}function s2(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function MX(e){if(typeof e=="string")e=new URL(e);else if(!s2(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $X(e)}function $X(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const a1=["history","path","basename","stem","extname","dirname"];class AP{constructor(t){let n;t?typeof t=="string"||LX(t)?n={value:t}:s2(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=DX.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<a1.length;){const o=a1[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)a1.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){s2(t)&&(t=MX(t)),l1(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?Qi.dirname(this.path):void 0}set dirname(t){KS(this.basename,"dirname"),this.path=Qi.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?Qi.basename(this.path):void 0}set basename(t){l1(t,"basename"),s1(t,"basename"),this.path=Qi.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?Qi.extname(this.path):void 0}set extname(t){if(s1(t,"extname"),KS(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qi.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?Qi.basename(this.path,this.extname):void 0}set stem(t){l1(t,"stem"),s1(t,"stem"),this.path=Qi.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const i=new xi(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}}function s1(e,t){if(e&&e.includes(Qi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qi.sep+"`")}function l1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function KS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LX(e){return PP(e)}function YS(e){if(e)throw e}var th=Object.prototype.hasOwnProperty,IP=Object.prototype.toString,XS=Object.defineProperty,QS=Object.getOwnPropertyDescriptor,JS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):IP.call(t)==="[object Array]"},ZS=function(t){if(!t||IP.call(t)!=="[object Object]")return!1;var n=th.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&th.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||th.call(t,i)},eC=function(t,n){XS&&n.name==="__proto__"?XS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},tC=function(t,n){if(n==="__proto__")if(th.call(t,n)){if(QS)return QS(t,n).value}else return;return t[n]},FX=function e(){var t,n,r,i,o,a,s=arguments[0],u=1,l=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=tC(s,n),i=tC(t,n),s!==i&&(d&&i&&(ZS(i)||(o=JS(i)))?(o?(o=!1,a=r&&JS(r)?r:[]):a=r&&ZS(r)?r:{},eC(s,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&eC(s,{name:n,newValue:i}));return s};const nC=nr(FX);function l2(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zX(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(u,...l){const d=e[++o];let f=-1;if(u){a(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,d?BX(d,s)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function BX(e,t){let n;return r;function r(...a){const s=e.length>a.length;let u;s&&a.push(i);try{u=e.apply(this,a)}catch(l){const d=l;if(s&&n)throw d;return i(d)}s||(u instanceof Promise?u.then(o,i):u instanceof Error?i(u):o(u))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const HX=OP().freeze(),TP={}.hasOwnProperty;function OP(){const e=zX(),t=[];let n={},r,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=s,o.attachers=t,o.use=u,o.parse=l,o.stringify=d,o.run=f,o.runSync=m,o.process=g,o.processSync=y,o;function o(){const v=OP();let _=-1;for(;++_<t.length;)v.use(...t[_]);return v.data(nC(!0,{},n)),v}function a(v,_){return typeof v=="string"?arguments.length===2?(d1("data",r),n[v]=_,o):TP.call(n,v)&&n[v]||null:v?(d1("data",r),n=v,o):n}function s(){if(r)return o;for(;++i<t.length;){const[v,..._]=t[i];if(_[0]===!1)continue;_[0]===!0&&(_[0]=void 0);const x=v.call(o,..._);typeof x=="function"&&e.use(x)}return r=!0,i=Number.POSITIVE_INFINITY,o}function u(v,..._){let x;if(d1("use",r),v!=null)if(typeof v=="function")w(v,..._);else if(typeof v=="object")Array.isArray(v)?p(v):C(v);else throw new TypeError("Expected usable value, not `"+v+"`");return x&&(n.settings=Object.assign(n.settings||{},x)),o;function S(b){if(typeof b=="function")w(b);else if(typeof b=="object")if(Array.isArray(b)){const[k,...E]=b;w(k,...E)}else C(b);else throw new TypeError("Expected usable value, not `"+b+"`")}function C(b){p(b.plugins),b.settings&&(x=Object.assign(x||{},b.settings))}function p(b){let k=-1;if(b!=null)if(Array.isArray(b))for(;++k<b.length;){const E=b[k];S(E)}else throw new TypeError("Expected a list of plugins, not `"+b+"`")}function w(b,k){let E=-1,I;for(;++E<t.length;)if(t[E][0]===b){I=t[E];break}I?(l2(I[1])&&l2(k)&&(k=nC(!0,I[1],k)),I[1]=k):t.push([...arguments])}}function l(v){o.freeze();const _=tu(v),x=o.Parser;return c1("parse",x),rC(x,"parse")?new x(String(_),_).parse():x(String(_),_)}function d(v,_){o.freeze();const x=tu(_),S=o.Compiler;return u1("stringify",S),iC(v),rC(S,"compile")?new S(v,x).compile():S(v,x)}function f(v,_,x){if(iC(v),o.freeze(),!x&&typeof _=="function"&&(x=_,_=void 0),!x)return new Promise(S);S(null,x);function S(C,p){e.run(v,tu(_),w);function w(b,k,E){k=k||v,b?p(b):C?C(k):x(null,k,E)}}}function m(v,_){let x,S;return o.run(v,_,C),oC("runSync","run",S),x;function C(p,w){YS(p),x=w,S=!0}}function g(v,_){if(o.freeze(),c1("process",o.Parser),u1("process",o.Compiler),!_)return new Promise(x);x(null,_);function x(S,C){const p=tu(v);o.run(o.parse(p),p,(b,k,E)=>{if(b||!k||!E)w(b);else{const I=o.stringify(k,E);I==null||(VX(I)?E.value=I:E.result=I),w(b,E)}});function w(b,k){b||!k?C(b):S?S(k):_(null,k)}}}function y(v){let _;o.freeze(),c1("processSync",o.Parser),u1("processSync",o.Compiler);const x=tu(v);return o.process(x,S),oC("processSync","process",_),x;function S(C){_=!0,YS(C)}}}function rC(e,t){return typeof e=="function"&&e.prototype&&(UX(e.prototype)||t in e.prototype)}function UX(e){let t;for(t in e)if(TP.call(e,t))return!0;return!1}function c1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function u1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function d1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function iC(e){if(!l2(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tu(e){return WX(e)?e:new AP(e)}function WX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VX(e){return typeof e=="string"||PP(e)}const qX={};function GX(e,t){const n=t||qX,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return DP(e,r,i)}function DP(e,t,n){if(KX(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return aC(e.children,t,n)}return Array.isArray(e)?aC(e,t,n):""}function aC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=DP(e[i],t,n);return r.join("")}function KX(e){return!!(e&&typeof e=="object")}function Ur(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function ci(e,t){return e.length>0?(Ur(e,e.length,0,t),e):t}const sC={}.hasOwnProperty;function NP(e){const t={};let n=-1;for(;++n<e.length;)YX(t,e[n]);return t}function YX(e,t){let n;for(n in t){const i=(sC.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){sC.call(i,a)||(i[a]=[]);const s=o[a];XX(i[a],Array.isArray(s)?s:s?[s]:[])}}}function XX(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ur(e,0,0,r)}const QX=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Zn=Va(/[A-Za-z]/),zn=Va(/[\dA-Za-z]/),JX=Va(/[#-'*+\--9=?A-Z^-~]/);function lm(e){return e!==null&&(e<32||e===127)}const c2=Va(/\d/),ZX=Va(/[\dA-Fa-f]/),eQ=Va(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Eg=Va(QX),Ts=Va(/\s/);function Va(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function Je(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(u){return Ge(u)?(e.enter(n),s(u)):t(u)}function s(u){return Ge(u)&&o++<i?(e.consume(u),s):(e.exit(n),t(u))}}const tQ={tokenize:nQ};function nQ(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Je(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ie(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const rQ={tokenize:iQ},lC={tokenize:oQ};function iQ(e){const t=this,n=[];let r=0,i,o,a;return s;function s(C){if(r<n.length){const p=n[r];return t.containerState=p[1],e.attempt(p[0].continuation,u,l)(C)}return l(C)}function u(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const p=t.events.length;let w=p,b;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){b=t.events[w][1].end;break}x(r);let k=p;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},b),k++;return Ur(t.events,w+1,0,t.events.slice(p)),t.events.length=k,l(C)}return s(C)}function l(C){if(r===n.length){if(!i)return m(C);if(i.currentConstruct&&i.currentConstruct.concrete)return y(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lC,d,f)(C)}function d(C){return i&&S(),x(r),m(C)}function f(C){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,y(C)}function m(C){return t.containerState={},e.attempt(lC,g,y)(C)}function g(C){return r++,n.push([t.currentConstruct,t.containerState]),m(C)}function y(C){if(C===null){i&&S(),x(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),v(C)}function v(C){if(C===null){_(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return Ie(C)?(e.consume(C),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(C),v)}function _(C,p){const w=t.sliceStream(C);if(p&&w.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(w),t.parser.lazy[C.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const k=t.events.length;let E=k,I,j;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(I){j=t.events[E][1].end;break}I=!0}for(x(r),b=k;b<t.events.length;)t.events[b][1].end=Object.assign({},j),b++;Ur(t.events,E+1,0,t.events.slice(k)),t.events.length=b}}function x(C){let p=n.length;for(;p-- >C;){const w=n[p];t.containerState=w[1],w[0].exit.call(t,e)}n.length=C}function S(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oQ(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cm(e){if(e===null||vt(e)||Ts(e))return 1;if(Eg(e))return 2}function Rg(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const u2={name:"attention",tokenize:sQ,resolveAll:aQ};function aQ(e,t){let n=-1,r,i,o,a,s,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);cC(f,-u),cC(m,u),a={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},o={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ci(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=ci(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=ci(l,Rg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ci(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=ci(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ur(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sQ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=cm(r);let o;return a;function a(u){return o=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===o)return e.consume(u),s;const l=e.exit("attentionSequence"),d=cm(u),f=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return l._open=!!(o===42?f:f&&(i||!m)),l._close=!!(o===42?m:m&&(d||!f)),t(u)}}function cC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const lQ={name:"autolink",tokenize:cQ};function cQ(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(g){return Zn(g)?(e.consume(g),a):l(g)}function a(g){return g===43||g===45||g===46||zn(g)?(r=1,s(g)):l(g)}function s(g){return g===58?(e.consume(g),r=0,u):(g===43||g===45||g===46||zn(g))&&r++<32?(e.consume(g),s):(r=0,l(g))}function u(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||lm(g)?n(g):(e.consume(g),u)}function l(g){return g===64?(e.consume(g),d):JX(g)?(e.consume(g),l):n(g)}function d(g){return zn(g)?f(g):n(g)}function f(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||zn(g))&&r++<63){const y=g===45?m:f;return e.consume(g),y}return n(g)}}const of={tokenize:uQ,partial:!0};function uQ(e,t,n){return r;function r(o){return Ge(o)?Je(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Ie(o)?t(o):n(o)}}const MP={name:"blockQuote",tokenize:dQ,continuation:{tokenize:fQ},exit:pQ};function dQ(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Ge(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function fQ(e,t,n){const r=this;return i;function i(a){return Ge(a)?Je(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(MP,t,n)(a)}}function pQ(e){e.exit("blockQuote")}const $P={name:"characterEscape",tokenize:hQ};function hQ(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return eQ(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const uC=document.createElement("i");function b3(e){const t="&"+e+";";uC.innerHTML=t;const n=uC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const LP={name:"characterReference",tokenize:mQ};function mQ(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=zn,d(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ZX,d):(e.enter("characterReferenceValue"),o=7,a=c2,d(f))}function d(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return a===zn&&!b3(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),d):n(f)}}const dC={tokenize:vQ,partial:!0},fC={name:"codeFenced",tokenize:gQ,concrete:!0};function gQ(e,t,n){const r=this,i={tokenize:w,partial:!0};let o=0,a=0,s;return u;function u(b){return l(b)}function l(b){const k=r.events[r.events.length-1];return o=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(b)}function d(b){return b===s?(a++,e.consume(b),d):a<3?n(b):(e.exit("codeFencedFenceSequence"),Ge(b)?Je(e,f,"whitespace")(b):f(b))}function f(b){return b===null||Ie(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(dC,v,p)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||Ie(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(b)):Ge(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,g,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),m)}function g(b){return b===null||Ie(b)?f(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||Ie(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(b)):b===96&&b===s?n(b):(e.consume(b),y)}function v(b){return e.attempt(i,p,_)(b)}function _(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),x}function x(b){return o>0&&Ge(b)?Je(e,S,"linePrefix",o+1)(b):S(b)}function S(b){return b===null||Ie(b)?e.check(dC,v,p)(b):(e.enter("codeFlowValue"),C(b))}function C(b){return b===null||Ie(b)?(e.exit("codeFlowValue"),S(b)):(e.consume(b),C)}function p(b){return e.exit("codeFenced"),t(b)}function w(b,k,E){let I=0;return j;function j(L){return b.enter("lineEnding"),b.consume(L),b.exit("lineEnding"),P}function P(L){return b.enter("codeFencedFence"),Ge(L)?Je(b,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return L===s?(b.enter("codeFencedFenceSequence"),W(L)):E(L)}function W(L){return L===s?(I++,b.consume(L),W):I>=a?(b.exit("codeFencedFenceSequence"),Ge(L)?Je(b,D,"whitespace")(L):D(L)):E(L)}function D(L){return L===null||Ie(L)?(b.exit("codeFencedFence"),k(L)):E(L)}}}function vQ(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const f1={name:"codeIndented",tokenize:bQ},yQ={tokenize:wQ,partial:!0};function bQ(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Je(e,o,"linePrefix",5)(l)}function o(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):Ie(l)?e.attempt(yQ,a,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Ie(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function wQ(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ie(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Je(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ie(a)?i(a):n(a)}}const xQ={name:"codeText",tokenize:_Q,resolve:SQ,previous:CQ};function SQ(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function CQ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _Q(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(o=e.enter("codeTextSequence"),i=0,d(f)):Ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Ie(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",l(f))}}function FP(e){const t={};let n=-1,r,i,o,a,s,u,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kQ(e,n)),n=t[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=e[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),s=e.slice(i,n),s.unshift(r),Ur(e,i,n-i+1,s))}}return!l}function kQ(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,u=[],l={};let d,f,m=-1,g=n,y=0,v=0;const _=[v];for(;g;){for(;e[++i][1]!==g;);o.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),f&&a.defineSkip(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=g,g=g.next}for(g=n;++m<s.length;)s[m][0]==="exit"&&s[m-1][0]==="enter"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(v=m+1,_.push(v),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):_.pop(),m=_.length;m--;){const x=s.slice(_[m],_[m+1]),S=o.pop();u.unshift([S,S+x.length-1]),Ur(e,S,2,x)}for(m=-1;++m<u.length;)l[y+u[m][0]]=y+u[m][1],y+=u[m][1]-u[m][0]-1;return l}const jQ={tokenize:PQ,resolve:RQ},EQ={tokenize:AQ,partial:!0};function RQ(e){return FP(e),e}function PQ(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Ie(s)?e.check(EQ,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function AQ(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,o,"linePrefix")}function o(a){if(a===null||Ie(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function zP(e,t,n,r,i,o,a,s,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),m):x===null||x===32||x===41||lm(x)?n(x):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(x))}function m(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===62?(e.exit("chunkString"),e.exit(s),m(x)):x===null||x===60||Ie(x)?n(x):(e.consume(x),x===92?y:g)}function y(x){return x===60||x===62||x===92?(e.consume(x),g):g(x)}function v(x){return!d&&(x===null||x===41||vt(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(x)):d<l&&x===40?(e.consume(x),d++,v):x===41?(e.consume(x),d--,v):x===null||x===32||x===40||lm(x)?n(x):(e.consume(x),x===92?_:v)}function _(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function BP(e,t,n,r,i,o){const a=this;let s=0,u;return l;function l(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(o),d}function d(g){return s>999||g===null||g===91||g===93&&!u||g===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(o),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Ie(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||Ie(g)||s++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!Ge(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,f):f(g)}}function HP(e,t,n,r,i,o){let a;return s;function s(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,u):n(m)}function u(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),l(m))}function l(m){return m===a?(e.exit(o),u(a)):m===null?n(m):Ie(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Je(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||Ie(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?f:d)}function f(m){return m===a||m===92?(e.consume(m),d):d(m)}}function Nu(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ge(i)?Je(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Bi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const IQ={name:"definition",tokenize:OQ},TQ={tokenize:DQ,partial:!0};function OQ(e,t,n){const r=this;let i;return o;function o(g){return e.enter("definition"),a(g)}function a(g){return BP.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function s(g){return i=Bi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):n(g)}function u(g){return vt(g)?Nu(e,l)(g):l(g)}function l(g){return zP(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(TQ,f,f)(g)}function f(g){return Ge(g)?Je(e,m,"whitespace")(g):m(g)}function m(g){return g===null||Ie(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function DQ(e,t,n){return r;function r(s){return vt(s)?Nu(e,i)(s):n(s)}function i(s){return HP(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Ge(s)?Je(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ie(s)?t(s):n(s)}}const NQ={name:"hardBreakEscape",tokenize:MQ};function MQ(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Ie(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const $Q={name:"headingAtx",tokenize:FQ,resolve:LQ};function LQ(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ur(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function FQ(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||vt(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Ie(d)?(e.exit("atxHeading"),t(d)):Ge(d)?Je(e,s,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),s(d))}function l(d){return d===null||d===35||vt(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),l)}}const zQ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],pC=["pre","script","style","textarea"],BQ={name:"htmlFlow",tokenize:VQ,resolveTo:WQ,concrete:!0},HQ={tokenize:GQ,partial:!0},UQ={tokenize:qQ,partial:!0};function WQ(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function VQ(e,t,n){const r=this;let i,o,a,s,u;return l;function l(z){return d(z)}function d(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),f}function f(z){return z===33?(e.consume(z),m):z===47?(e.consume(z),o=!0,v):z===63?(e.consume(z),i=3,r.interrupt?t:N):Zn(z)?(e.consume(z),a=String.fromCharCode(z),_):n(z)}function m(z){return z===45?(e.consume(z),i=2,g):z===91?(e.consume(z),i=5,s=0,y):Zn(z)?(e.consume(z),i=4,r.interrupt?t:N):n(z)}function g(z){return z===45?(e.consume(z),r.interrupt?t:N):n(z)}function y(z){const Ce="CDATA[";return z===Ce.charCodeAt(s++)?(e.consume(z),s===Ce.length?r.interrupt?t:B:y):n(z)}function v(z){return Zn(z)?(e.consume(z),a=String.fromCharCode(z),_):n(z)}function _(z){if(z===null||z===47||z===62||vt(z)){const Ce=z===47,Ee=a.toLowerCase();return!Ce&&!o&&pC.includes(Ee)?(i=1,r.interrupt?t(z):B(z)):zQ.includes(a.toLowerCase())?(i=6,Ce?(e.consume(z),x):r.interrupt?t(z):B(z)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(z):o?S(z):C(z))}return z===45||zn(z)?(e.consume(z),a+=String.fromCharCode(z),_):n(z)}function x(z){return z===62?(e.consume(z),r.interrupt?t:B):n(z)}function S(z){return Ge(z)?(e.consume(z),S):j(z)}function C(z){return z===47?(e.consume(z),j):z===58||z===95||Zn(z)?(e.consume(z),p):Ge(z)?(e.consume(z),C):j(z)}function p(z){return z===45||z===46||z===58||z===95||zn(z)?(e.consume(z),p):w(z)}function w(z){return z===61?(e.consume(z),b):Ge(z)?(e.consume(z),w):C(z)}function b(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),u=z,k):Ge(z)?(e.consume(z),b):E(z)}function k(z){return z===u?(e.consume(z),u=null,I):z===null||Ie(z)?n(z):(e.consume(z),k)}function E(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||vt(z)?w(z):(e.consume(z),E)}function I(z){return z===47||z===62||Ge(z)?C(z):n(z)}function j(z){return z===62?(e.consume(z),P):n(z)}function P(z){return z===null||Ie(z)?B(z):Ge(z)?(e.consume(z),P):n(z)}function B(z){return z===45&&i===2?(e.consume(z),T):z===60&&i===1?(e.consume(z),V):z===62&&i===4?(e.consume(z),J):z===63&&i===3?(e.consume(z),N):z===93&&i===5?(e.consume(z),q):Ie(z)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(HQ,se,W)(z)):z===null||Ie(z)?(e.exit("htmlFlowData"),W(z)):(e.consume(z),B)}function W(z){return e.check(UQ,D,se)(z)}function D(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),L}function L(z){return z===null||Ie(z)?W(z):(e.enter("htmlFlowData"),B(z))}function T(z){return z===45?(e.consume(z),N):B(z)}function V(z){return z===47?(e.consume(z),a="",H):B(z)}function H(z){if(z===62){const Ce=a.toLowerCase();return pC.includes(Ce)?(e.consume(z),J):B(z)}return Zn(z)&&a.length<8?(e.consume(z),a+=String.fromCharCode(z),H):B(z)}function q(z){return z===93?(e.consume(z),N):B(z)}function N(z){return z===62?(e.consume(z),J):z===45&&i===2?(e.consume(z),N):B(z)}function J(z){return z===null||Ie(z)?(e.exit("htmlFlowData"),se(z)):(e.consume(z),J)}function se(z){return e.exit("htmlFlow"),t(z)}}function qQ(e,t,n){const r=this;return i;function i(a){return Ie(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function GQ(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(of,t,n)}}const KQ={name:"htmlText",tokenize:YQ};function YQ(e,t,n){const r=this;let i,o,a;return s;function s(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),l):N===47?(e.consume(N),w):N===63?(e.consume(N),C):Zn(N)?(e.consume(N),E):n(N)}function l(N){return N===45?(e.consume(N),d):N===91?(e.consume(N),o=0,y):Zn(N)?(e.consume(N),S):n(N)}function d(N){return N===45?(e.consume(N),g):n(N)}function f(N){return N===null?n(N):N===45?(e.consume(N),m):Ie(N)?(a=f,V(N)):(e.consume(N),f)}function m(N){return N===45?(e.consume(N),g):f(N)}function g(N){return N===62?T(N):N===45?m(N):f(N)}function y(N){const J="CDATA[";return N===J.charCodeAt(o++)?(e.consume(N),o===J.length?v:y):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),_):Ie(N)?(a=v,V(N)):(e.consume(N),v)}function _(N){return N===93?(e.consume(N),x):v(N)}function x(N){return N===62?T(N):N===93?(e.consume(N),x):v(N)}function S(N){return N===null||N===62?T(N):Ie(N)?(a=S,V(N)):(e.consume(N),S)}function C(N){return N===null?n(N):N===63?(e.consume(N),p):Ie(N)?(a=C,V(N)):(e.consume(N),C)}function p(N){return N===62?T(N):C(N)}function w(N){return Zn(N)?(e.consume(N),b):n(N)}function b(N){return N===45||zn(N)?(e.consume(N),b):k(N)}function k(N){return Ie(N)?(a=k,V(N)):Ge(N)?(e.consume(N),k):T(N)}function E(N){return N===45||zn(N)?(e.consume(N),E):N===47||N===62||vt(N)?I(N):n(N)}function I(N){return N===47?(e.consume(N),T):N===58||N===95||Zn(N)?(e.consume(N),j):Ie(N)?(a=I,V(N)):Ge(N)?(e.consume(N),I):T(N)}function j(N){return N===45||N===46||N===58||N===95||zn(N)?(e.consume(N),j):P(N)}function P(N){return N===61?(e.consume(N),B):Ie(N)?(a=P,V(N)):Ge(N)?(e.consume(N),P):I(N)}function B(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,W):Ie(N)?(a=B,V(N)):Ge(N)?(e.consume(N),B):(e.consume(N),D)}function W(N){return N===i?(e.consume(N),i=void 0,L):N===null?n(N):Ie(N)?(a=W,V(N)):(e.consume(N),W)}function D(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||vt(N)?I(N):(e.consume(N),D)}function L(N){return N===47||N===62||vt(N)?I(N):n(N)}function T(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function V(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),H}function H(N){return Ge(N)?Je(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):q(N)}function q(N){return e.enter("htmlTextData"),a(N)}}const w3={name:"labelEnd",tokenize:tJ,resolveTo:eJ,resolveAll:ZQ},XQ={tokenize:nJ},QQ={tokenize:rJ},JQ={tokenize:iJ};function ZQ(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function eJ(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=ci(s,e.slice(o+1,o+r+3)),s=ci(s,[["enter",d,t]]),s=ci(s,Rg(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=ci(s,[["exit",d,t],e[a-2],e[a-1],["exit",l,t]]),s=ci(s,e.slice(a+1)),s=ci(s,[["exit",u,t]]),Ur(e,o,e.length,s),e}function tJ(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(m){return o?o._inactive?f(m):(a=r.parser.defined.includes(Bi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(XQ,d,a?d:f)(m):m===91?e.attempt(QQ,d,a?l:f)(m):a?d(m):f(m)}function l(m){return e.attempt(JQ,d,f)(m)}function d(m){return t(m)}function f(m){return o._balanced=!0,n(m)}}function nJ(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return vt(f)?Nu(e,o)(f):o(f)}function o(f){return f===41?d(f):zP(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return vt(f)?Nu(e,u)(f):d(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?HP(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function l(f){return vt(f)?Nu(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function rJ(e,t,n){const r=this;return i;function i(s){return BP.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Bi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function iJ(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const oJ={name:"labelStartImage",tokenize:aJ,resolveAll:w3.resolveAll};function aJ(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const sJ={name:"labelStartLink",tokenize:lJ,resolveAll:w3.resolveAll};function lJ(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const p1={name:"lineEnding",tokenize:cJ};function cJ(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const nh={name:"thematicBreak",tokenize:uJ};function uJ(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Ie(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ge(l)?Je(e,s,"whitespace")(l):s(l))}}const hr={name:"list",tokenize:pJ,continuation:{tokenize:hJ},exit:gJ},dJ={tokenize:vJ,partial:!0},fJ={tokenize:mJ,partial:!0};function pJ(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){const y=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:c2(g)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(nh,n,l)(g):l(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return n(g)}function u(g){return c2(g)&&++a<10?(e.consume(g),u):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),l(g)):n(g)}function l(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(of,r.interrupt?n:d,e.attempt(dJ,m,f))}function d(g){return r.containerState.initialBlankLine=!0,o++,m(g)}function f(g){return Ge(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function hJ(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(of,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Ge(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fJ,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function mJ(e,t,n){const r=this;return Je(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function gJ(e){e.exit(this.containerState.type)}function vJ(e,t,n){const r=this;return Je(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Ge(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const hC={name:"setextUnderline",tokenize:bJ,resolveTo:yJ};function yJ(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function bJ(e,t,n){const r=this;let i;return o;function o(l){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ge(l)?Je(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Ie(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const wJ={tokenize:xJ};function xJ(e){const t=this,n=e.attempt(of,r,e.attempt(this.parser.constructs.flowInitial,i,Je(e,e.attempt(this.parser.constructs.flow,i,e.attempt(jQ,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const SJ={resolveAll:WP()},CJ=UP("string"),_J=UP("text");function UP(e){return{tokenize:t,resolveAll:WP(e==="text"?kJ:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(d){return l(d)?o(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),o(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const f=i[d];let m=-1;if(f)for(;++m<f.length;){const g=f[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function WP(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function kJ(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,u;for(;o--;){const l=i[o];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)u=!0,s++;else if(l!==-1){o++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function jJ(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const u={consume:S,enter:C,exit:p,attempt:k(w),check:k(b),interrupt:k(b,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:m,now:y,defineSkip:v,write:f};let d=t.tokenize.call(l,u);return t.resolveAll&&o.push(t),l;function f(P){return a=ci(a,P),_(),a[a.length-1]!==null?[]:(E(t,0),l.events=Rg(o,l.events,l),l.events)}function m(P,B){return RJ(g(P),B)}function g(P){return EJ(a,P)}function y(){const{line:P,column:B,offset:W,_index:D,_bufferIndex:L}=r;return{line:P,column:B,offset:W,_index:D,_bufferIndex:L}}function v(P){i[P.line]=P.column,j()}function _(){let P;for(;r._index<a.length;){const B=a[r._index];if(typeof B=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<B.length;)x(B.charCodeAt(r._bufferIndex));else x(B)}}function x(P){d=d(P)}function S(P){Ie(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,j()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=P}function C(P,B){const W=B||{};return W.type=P,W.start=y(),l.events.push(["enter",W,l]),s.push(W),W}function p(P){const B=s.pop();return B.end=y(),l.events.push(["exit",B,l]),B}function w(P,B){E(P,B.from)}function b(P,B){B.restore()}function k(P,B){return W;function W(D,L,T){let V,H,q,N;return Array.isArray(D)?se(D):"tokenize"in D?se([D]):J(D);function J(ye){return Re;function Re(Oe){const rt=Oe!==null&&ye[Oe],Pe=Oe!==null&&ye.null,zt=[...Array.isArray(rt)?rt:rt?[rt]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return se(zt)(Oe)}}function se(ye){return V=ye,H=0,ye.length===0?T:z(ye[H])}function z(ye){return Re;function Re(Oe){return N=I(),q=ye,ye.partial||(l.currentConstruct=ye),ye.name&&l.parser.constructs.disable.null.includes(ye.name)?Ee():ye.tokenize.call(B?Object.assign(Object.create(l),B):l,u,Ce,Ee)(Oe)}}function Ce(ye){return P(q,N),L}function Ee(ye){return N.restore(),++H<V.length?z(V[H]):T}}}function E(P,B){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&Ur(l.events,B,l.events.length-B,P.resolve(l.events.slice(B),l)),P.resolveTo&&(l.events=P.resolveTo(l.events,l))}function I(){const P=y(),B=l.previous,W=l.currentConstruct,D=l.events.length,L=Array.from(s);return{restore:T,from:D};function T(){r=P,l.previous=B,l.currentConstruct=W,l.events.length=D,s=L,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function EJ(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function RJ(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
`;break}case-3:{a=`\r
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const PJ={42:hr,43:hr,45:hr,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,62:MP},AJ={91:IQ},IJ={[-2]:f1,[-1]:f1,32:f1},TJ={35:$Q,42:nh,45:[hC,nh],60:BQ,61:hC,95:nh,96:fC,126:fC},OJ={38:LP,92:$P},DJ={[-5]:p1,[-4]:p1,[-3]:p1,33:oJ,38:LP,42:u2,60:[lQ,KQ],91:sJ,92:[NQ,$P],93:w3,95:u2,96:xQ},NJ={null:[u2,SJ]},MJ={null:[42,95]},$J={null:[]},LJ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MJ,contentInitial:AJ,disable:$J,document:PJ,flow:TJ,flowInitial:IJ,insideSpan:NJ,string:OJ,text:DJ},Symbol.toStringTag,{value:"Module"}));function FJ(e){const n=NP([LJ,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(tQ),document:i(rQ),flow:i(wJ),string:i(CJ),text:i(_J)};return r;function i(o){return a;function a(s){return jJ(r,o,s)}}}const mC=/[\0\t\n\r]/g;function zJ(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const u=[];let l,d,f,m,g;for(o=t+o.toString(a),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(mC.lastIndex=f,l=mC.exec(o),m=l&&l.index!==void 0?l.index:o.length,g=o.charCodeAt(m),!l){t=o.slice(f);break}if(g===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(o.slice(f,m)),e+=m-f),g){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}function BJ(e){for(;!FP(e););return e}function VP(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const HJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qP(e){return e.replace(HJ,UJ)}function UJ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return VP(n.slice(o?2:1),o?16:10)}return b3(n)||e}const GP={}.hasOwnProperty,WJ=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),VJ(n)(BJ(FJ(n).document().write(zJ()(e,t,!0))))};function VJ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Vt),autolinkProtocol:P,autolinkEmail:P,atxHeading:s(Sn),blockQuote:s(zt),characterEscape:P,characterReference:P,codeFenced:s(dt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(dt,u),codeText:s(tn,u),codeTextData:P,data:P,codeFlowValue:P,definition:s(Tt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(Bt),hardBreakEscape:s(un),hardBreakTrailing:s(un),htmlFlow:s(_i,u),htmlFlowData:P,htmlText:s(_i,u),htmlTextData:P,image:s(Zr),label:u,link:s(Vt),listItem:s(me),listItemValue:y,listOrdered:s(ei,g),listUnordered:s(ei),paragraph:s(De),reference:Ee,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(Sn),strong:s(St),thematicBreak:s(Cn)},exit:{atxHeading:d(),atxHeadingSequence:k,autolink:d(),autolinkEmail:Pe,autolinkProtocol:rt,blockQuote:d(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,codeFenced:d(S),codeFencedFence:x,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:B,codeIndented:d(C),codeText:d(V),codeTextData:B,data:B,definition:d(),definitionDestinationString:b,definitionLabelString:p,definitionTitleString:w,emphasis:d(),hardBreakEscape:d(D),hardBreakTrailing:d(D),htmlFlow:d(L),htmlFlowData:B,htmlText:d(T),htmlTextData:B,image:d(q),label:J,labelText:N,lineEnding:W,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:se,resourceTitleString:z,resource:Ce,setextHeading:d(j),setextHeadingLineSequence:I,setextHeadingText:E,strong:d(),thematicBreak:d()}};KP(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(X){let ie={type:"root",children:[]};const _e={stack:[ie],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:m,setData:o,getData:a},qe=[];let $e=-1;for(;++$e<X.length;)if(X[$e][1].type==="listOrdered"||X[$e][1].type==="listUnordered")if(X[$e][0]==="enter")qe.push($e);else{const Ht=qe.pop();$e=i(X,Ht,$e)}for($e=-1;++$e<X.length;){const Ht=t[X[$e][0]];GP.call(Ht,X[$e][1].type)&&Ht[X[$e][1].type].call(Object.assign({sliceSerialize:X[$e][2].sliceSerialize},_e),X[$e][1])}if(_e.tokenStack.length>0){const Ht=_e.tokenStack[_e.tokenStack.length-1];(Ht[1]||gC).call(_e,void 0,Ht[0])}for(ie.position={start:Yo(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Yo(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)ie=t.transforms[$e](ie)||ie;return ie}function i(X,ie,_e){let qe=ie-1,$e=-1,Ht=!1,_n,kn,cr,kr;for(;++qe<=_e;){const at=X[qe];if(at[1].type==="listUnordered"||at[1].type==="listOrdered"||at[1].type==="blockQuote"?(at[0]==="enter"?$e++:$e--,kr=void 0):at[1].type==="lineEndingBlank"?at[0]==="enter"&&(_n&&!kr&&!$e&&!cr&&(cr=qe),kr=void 0):at[1].type==="linePrefix"||at[1].type==="listItemValue"||at[1].type==="listItemMarker"||at[1].type==="listItemPrefix"||at[1].type==="listItemPrefixWhitespace"||(kr=void 0),!$e&&at[0]==="enter"&&at[1].type==="listItemPrefix"||$e===-1&&at[0]==="exit"&&(at[1].type==="listUnordered"||at[1].type==="listOrdered")){if(_n){let ki=qe;for(kn=void 0;ki--;){const Gn=X[ki];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;kn&&(X[kn][1].type="lineEndingBlank",Ht=!0),Gn[1].type="lineEnding",kn=ki}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}cr&&(!kn||cr<kn)&&(_n._spread=!0),_n.end=Object.assign({},kn?X[kn][1].start:at[1].end),X.splice(kn||qe,0,["exit",_n,at[2]]),qe++,_e++}at[1].type==="listItemPrefix"&&(_n={type:"listItem",_spread:!1,start:Object.assign({},at[1].start),end:void 0},X.splice(qe,0,["enter",_n,at[2]]),qe++,_e++,cr=void 0,kr=!0)}}return X[ie][1]._spread=Ht,_e}function o(X,ie){n[X]=ie}function a(X){return n[X]}function s(X,ie){return _e;function _e(qe){l.call(this,X(qe),qe),ie&&ie.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(X,ie,_e){return this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ie,_e]),X.position={start:Yo(ie.start)},X}function d(X){return ie;function ie(_e){X&&X.call(this,_e),f.call(this,_e)}}function f(X,ie){const _e=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==X.type&&(ie?ie.call(this,X,qe[0]):(qe[1]||gC).call(this,X,qe[0]));else throw new Error("Cannot close `"+X.type+"` ("+Du({start:X.start,end:X.end})+"): it’s not open");return _e.position.end=Yo(X.end),_e}function m(){return GX(this.stack.pop())}function g(){o("expectingFirstListItemValue",!0)}function y(X){if(a("expectingFirstListItemValue")){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(X),10),o("expectingFirstListItemValue")}}function v(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=X}function _(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=X}function x(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function S(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function C(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.value=X.replace(/(\r?\n|\r)$/g,"")}function p(X){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ie,_e.identifier=Bi(this.sliceSerialize(X)).toLowerCase()}function w(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.title=X}function b(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.url=X}function k(X){const ie=this.stack[this.stack.length-1];if(!ie.depth){const _e=this.sliceSerialize(X).length;ie.depth=_e}}function E(){o("setextHeadingSlurpLineEnding",!0)}function I(X){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(X).charCodeAt(0)===61?1:2}function j(){o("setextHeadingSlurpLineEnding")}function P(X){const ie=this.stack[this.stack.length-1];let _e=ie.children[ie.children.length-1];(!_e||_e.type!=="text")&&(_e=qt(),_e.position={start:Yo(X.start)},ie.children.push(_e)),this.stack.push(_e)}function B(X){const ie=this.stack.pop();ie.value+=this.sliceSerialize(X),ie.position.end=Yo(X.end)}function W(X){const ie=this.stack[this.stack.length-1];if(a("atHardBreak")){const _e=ie.children[ie.children.length-1];_e.position.end=Yo(X.end),o("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(ie.type)&&(P.call(this,X),B.call(this,X))}function D(){o("atHardBreak",!0)}function L(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.value=X}function T(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.value=X}function V(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.value=X}function H(){const X=this.stack[this.stack.length-1];if(a("inReference")){const ie=a("referenceType")||"shortcut";X.type+="Reference",X.referenceType=ie,delete X.url,delete X.title}else delete X.identifier,delete X.label;o("referenceType")}function q(){const X=this.stack[this.stack.length-1];if(a("inReference")){const ie=a("referenceType")||"shortcut";X.type+="Reference",X.referenceType=ie,delete X.url,delete X.title}else delete X.identifier,delete X.label;o("referenceType")}function N(X){const ie=this.sliceSerialize(X),_e=this.stack[this.stack.length-2];_e.label=qP(ie),_e.identifier=Bi(ie).toLowerCase()}function J(){const X=this.stack[this.stack.length-1],ie=this.resume(),_e=this.stack[this.stack.length-1];if(o("inReference",!0),_e.type==="link"){const qe=X.children;_e.children=qe}else _e.alt=ie}function se(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.url=X}function z(){const X=this.resume(),ie=this.stack[this.stack.length-1];ie.title=X}function Ce(){o("inReference")}function Ee(){o("referenceType","collapsed")}function ye(X){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ie,_e.identifier=Bi(this.sliceSerialize(X)).toLowerCase(),o("referenceType","full")}function Re(X){o("characterReferenceType",X.type)}function Oe(X){const ie=this.sliceSerialize(X),_e=a("characterReferenceType");let qe;_e?(qe=VP(ie,_e==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):qe=b3(ie);const $e=this.stack.pop();$e.value+=qe,$e.position.end=Yo(X.end)}function rt(X){B.call(this,X);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(X)}function Pe(X){B.call(this,X);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(X)}function zt(){return{type:"blockquote",children:[]}}function dt(){return{type:"code",lang:null,meta:null,value:""}}function tn(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bt(){return{type:"emphasis",children:[]}}function Sn(){return{type:"heading",depth:void 0,children:[]}}function un(){return{type:"break"}}function _i(){return{type:"html",value:""}}function Zr(){return{type:"image",title:null,url:"",alt:null}}function Vt(){return{type:"link",title:null,url:"",children:[]}}function ei(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function me(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function qt(){return{type:"text",value:""}}function Cn(){return{type:"thematicBreak"}}}function Yo(e){return{line:e.line,column:e.column,offset:e.offset}}function KP(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?KP(e,r):qJ(e,r)}}function qJ(e,t){let n;for(n in t)if(GP.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function gC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Du({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Du({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Du({start:t.start,end:t.end})+") is still open")}function GJ(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return WJ(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function KJ(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YJ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function XJ(e,t){const n=t.value?t.value+`
`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function QJ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JJ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&zn(e.charCodeAt(n+1))&&zn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function YP(e,t){const n=String(t.identifier).toUpperCase(),r=jc(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function ZJ(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},YP(e,{type:"footnoteReference",identifier:i,position:t.position})}function eZ(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tZ(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function XP(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function nZ(e,t){const n=e.definition(t.identifier);if(!n)return XP(e,t);const r={src:jc(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function rZ(e,t){const n={src:jc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iZ(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function oZ(e,t){const n=e.definition(t.identifier);if(!n)return XP(e,t);const r={href:jc(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function aZ(e,t){const n={href:jc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sZ(e,t,n){const r=e.all(t),i=n?lZ(n):QP(t),o={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(i||s!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
`});const l={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,l),e.applyData(t,l)}function lZ(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=QP(n[r])}return t}function QP(e){const t=e.spread;return t??e.children.length>1}function cZ(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function uZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const x3=JP("start"),S3=JP("end");function pZ(e){return{start:x3(e),end:S3(e)}}function JP(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function hZ(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=x3(t.children[1]),u=S3(t.children[t.children.length-1]);s.line&&u.line&&(a.position={start:s,end:u}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function mZ(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],m={},g=a?a[u]:void 0;g&&(m.align=g);let y={type:"element",tagName:o,properties:m,children:[]};f&&(y.children=e.all(f),e.patch(f,y),y=e.applyData(t,y)),l.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function gZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const vC=9,yC=32;function vZ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(bC(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(bC(t.slice(i),i>0,!1)),o.join("")}function bC(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===vC||o===yC;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===vC||o===yC;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yZ(e,t){const n={type:"text",value:vZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function bZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wZ={blockquote:KJ,break:YJ,code:XJ,delete:QJ,emphasis:JJ,footnoteReference:YP,footnote:ZJ,heading:eZ,html:tZ,imageReference:nZ,image:rZ,inlineCode:iZ,linkReference:oZ,link:aZ,listItem:sZ,list:cZ,paragraph:uZ,root:dZ,strong:fZ,table:hZ,tableCell:gZ,tableRow:mZ,text:yZ,thematicBreak:bZ,toml:Zf,yaml:Zf,definition:Zf,footnoteDefinition:Zf};function Zf(){return null}const C3=function(e){if(e==null)return _Z;if(typeof e=="string")return CZ(e);if(typeof e=="object")return Array.isArray(e)?xZ(e):SZ(e);if(typeof e=="function")return Pg(e);throw new Error("Expected function, string, or object as test")};function xZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=C3(e[n]);return Pg(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function SZ(e){return Pg(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function CZ(e){return Pg(t);function t(n){return n&&n.type===e}}function Pg(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function _Z(){return!0}const kZ=!0,wC=!1,jZ="skip",ZP=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const i=C3(t),o=r?-1:1;a(e,void 0,[])();function a(s,u,l){const d=s&&typeof s=="object"?s:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=[],g,y,v;if((!t||i(s,u,l[l.length-1]||null))&&(m=EZ(n(s,l)),m[0]===wC))return m;if(s.children&&m[0]!==jZ)for(y=(r?s.children.length:-1)+o,v=l.concat(s);y>-1&&y<s.children.length;){if(g=a(s.children[y],y,v)(),g[0]===wC)return g;y=typeof g[1]=="number"?g[1]:y+o}return m}}};function EZ(e){return Array.isArray(e)?e:typeof e=="number"?[kZ,e]:[e]}const _3=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),ZP(e,t,i,r);function i(o,a){const s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}};function RZ(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const xC={}.hasOwnProperty;function PZ(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return _3(e,"definition",r=>{const i=SC(r.identifier);i&&!xC.call(t,i)&&(t[i]=r)}),n;function n(r){const i=SC(r);return i&&xC.call(t,i)?t[i]:null}}function SC(e){return String(e||"").toUpperCase()}const um={}.hasOwnProperty;function AZ(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers={...wZ,...n.handlers},a.definition=PZ(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=IZ,a.applyData=TZ,a.one=s,a.all=u,a.wrap=DZ,a.augment=o,_3(e,"footnoteDefinition",l=>{const d=String(l.identifier).toUpperCase();um.call(i,d)||(i[d]=l)}),a;function o(l,d){if(l&&"data"in l&&l.data){const f=l.data;f.hName&&(d.type!=="element"&&(d={type:"element",tagName:"",properties:{},children:[]}),d.tagName=f.hName),d.type==="element"&&f.hProperties&&(d.properties={...d.properties,...f.hProperties}),"children"in d&&d.children&&f.hChildren&&(d.children=f.hChildren)}if(l){const f="type"in l?l:{position:l};RZ(f)||(d.position={start:x3(f),end:S3(f)})}return d}function a(l,d,f,m){return Array.isArray(f)&&(m=f,f={}),o(l,{type:"element",tagName:d,properties:f||{},children:m||[]})}function s(l,d){return eA(a,l,d)}function u(l){return k3(a,l)}}function IZ(e,t){e.position&&(t.position=pZ(e))}function TZ(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function eA(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return um.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:k3(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):OZ(e,t)}function k3(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=eA(e,r[i],t);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){const a=o.children[0];a&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function OZ(e,t){const n=t.data||{},r="value"in t&&!(um.call(n,"hProperties")||um.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:k3(e,t)};return e.patch(t,r),e.applyData(t,r)}function DZ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function NZ(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const i=e.all(r),o=String(r.identifier).toUpperCase(),a=jc(o.toLowerCase());let s=0;const u=[];for(;++s<=e.footnoteCounts[o];){const f={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};s>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),u.length>0&&u.push({type:"text",value:" "}),u.push(f)}const l=i[i.length-1];if(l&&l.type==="element"&&l.tagName==="p"){const f=l.children[l.children.length-1];f&&f.type==="text"?f.value+=" ":l.children.push({type:"text",value:" "}),l.children.push(...u)}else i.push(...u);const d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
`}]}}function tA(e,t){const n=AZ(e,t),r=n.one(e,null),i=NZ(n);return i&&r.children.push({type:"text",value:`
`},i),Array.isArray(r)?{type:"root",children:r}:r}const MZ=function(e,t){return e&&"run"in e?LZ(e,t):FZ(e||t)},$Z=MZ;function LZ(e,t){return(n,r,i)=>{e.run(tA(n,t),r,o=>{i(o)})}}function FZ(e){return t=>tA(t,e)}class af{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}af.prototype.property={};af.prototype.normal={};af.prototype.space=null;function nA(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new af(n,r,t)}function d2(e){return e.toLowerCase()}class Si{constructor(t,n){this.property=t,this.attribute=n}}Si.prototype.space=null;Si.prototype.boolean=!1;Si.prototype.booleanish=!1;Si.prototype.overloadedBoolean=!1;Si.prototype.number=!1;Si.prototype.commaSeparated=!1;Si.prototype.spaceSeparated=!1;Si.prototype.commaOrSpaceSeparated=!1;Si.prototype.mustUseProperty=!1;Si.prototype.defined=!1;let zZ=0;const Ue=Us(),Qt=Us(),rA=Us(),de=Us(),kt=Us(),Wl=Us(),Ir=Us();function Us(){return 2**++zZ}const f2=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Qt,commaOrSpaceSeparated:Ir,commaSeparated:Wl,number:de,overloadedBoolean:rA,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),h1=Object.keys(f2);class j3 extends Si{constructor(t,n,r,i){let o=-1;if(super(t,n),CC(this,"space",i),typeof r=="number")for(;++o<h1.length;){const a=h1[o];CC(this,h1[o],(r&f2[a])===f2[a])}}}j3.prototype.defined=!0;function CC(e,t,n){n&&(e[t]=n)}const BZ={}.hasOwnProperty;function Ec(e){const t={},n={};let r;for(r in e.properties)if(BZ.call(e.properties,r)){const i=e.properties[r],o=new j3(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[d2(r)]=r,n[d2(o.attribute)]=r}return new af(t,n,e.space)}const iA=Ec({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),oA=Ec({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function aA(e,t){return t in e?e[t]:t}function sA(e,t){return aA(e,t.toLowerCase())}const lA=Ec({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:sA,properties:{xmlns:null,xmlnsXLink:null}}),cA=Ec({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Qt,ariaAutoComplete:null,ariaBusy:Qt,ariaChecked:Qt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Qt,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Qt,ariaFlowTo:kt,ariaGrabbed:Qt,ariaHasPopup:null,ariaHidden:Qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:de,ariaLive:null,ariaModal:Qt,ariaMultiLine:Qt,ariaMultiSelectable:Qt,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Qt,ariaReadOnly:Qt,ariaRelevant:null,ariaRequired:Qt,ariaRoleDescription:kt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Qt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null}}),HZ=Ec({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:sA,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wl,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:kt,autoFocus:Ue,autoPlay:Ue,capture:Ue,charSet:null,checked:Ue,cite:null,className:kt,cols:de,colSpan:null,content:null,contentEditable:Qt,controls:Ue,controlsList:kt,coords:de|Wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:rA,draggable:Qt,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:kt,height:de,hidden:Ue,high:de,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ue,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:de,pattern:null,ping:kt,placeholder:null,playsInline:Ue,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:kt,required:Ue,reversed:Ue,rows:de,rowSpan:de,sandbox:kt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Qt,width:de,wrap:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Qt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:de,security:null,unselectable:null}}),UZ=Ec({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:aA,properties:{about:Ir,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:kt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wl,g2:Wl,glyphName:Wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:Ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ir,rev:Ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ir,requiredFeatures:Ir,requiredFonts:Ir,requiredFormats:Ir,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:Ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ir,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ir,to:null,transform:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),WZ=/^data[-\w.:]+$/i,_C=/-[a-z]/g,VZ=/[A-Z]/g;function qZ(e,t){const n=d2(t);let r=t,i=Si;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WZ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(_C,KZ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!_C.test(o)){let a=o.replace(VZ,GZ);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=j3}return new i(r,t)}function GZ(e){return"-"+e.toLowerCase()}function KZ(e){return e.charAt(1).toUpperCase()}const kC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},YZ=nA([oA,iA,lA,cA,HZ],"html"),XZ=nA([oA,iA,lA,cA,UZ],"svg");function QZ(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{_3(t,"element",(n,r,i)=>{const o=i;let a;if(e.allowedElements?a=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(n.tagName)),!a&&e.allowElement&&typeof r=="number"&&(a=!e.allowElement(n,r,o)),a&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var uA={exports:{}},ct={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var E3=Symbol.for("react.element"),R3=Symbol.for("react.portal"),Ag=Symbol.for("react.fragment"),Ig=Symbol.for("react.strict_mode"),Tg=Symbol.for("react.profiler"),Og=Symbol.for("react.provider"),Dg=Symbol.for("react.context"),JZ=Symbol.for("react.server_context"),Ng=Symbol.for("react.forward_ref"),Mg=Symbol.for("react.suspense"),$g=Symbol.for("react.suspense_list"),Lg=Symbol.for("react.memo"),Fg=Symbol.for("react.lazy"),ZZ=Symbol.for("react.offscreen"),dA;dA=Symbol.for("react.module.reference");function Ci(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case E3:switch(e=e.type,e){case Ag:case Tg:case Ig:case Mg:case $g:return e;default:switch(e=e&&e.$$typeof,e){case JZ:case Dg:case Ng:case Fg:case Lg:case Og:return e;default:return t}}case R3:return t}}}ct.ContextConsumer=Dg;ct.ContextProvider=Og;ct.Element=E3;ct.ForwardRef=Ng;ct.Fragment=Ag;ct.Lazy=Fg;ct.Memo=Lg;ct.Portal=R3;ct.Profiler=Tg;ct.StrictMode=Ig;ct.Suspense=Mg;ct.SuspenseList=$g;ct.isAsyncMode=function(){return!1};ct.isConcurrentMode=function(){return!1};ct.isContextConsumer=function(e){return Ci(e)===Dg};ct.isContextProvider=function(e){return Ci(e)===Og};ct.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===E3};ct.isForwardRef=function(e){return Ci(e)===Ng};ct.isFragment=function(e){return Ci(e)===Ag};ct.isLazy=function(e){return Ci(e)===Fg};ct.isMemo=function(e){return Ci(e)===Lg};ct.isPortal=function(e){return Ci(e)===R3};ct.isProfiler=function(e){return Ci(e)===Tg};ct.isStrictMode=function(e){return Ci(e)===Ig};ct.isSuspense=function(e){return Ci(e)===Mg};ct.isSuspenseList=function(e){return Ci(e)===$g};ct.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ag||e===Tg||e===Ig||e===Mg||e===$g||e===ZZ||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Lg||e.$$typeof===Og||e.$$typeof===Dg||e.$$typeof===Ng||e.$$typeof===dA||e.getModuleId!==void 0)};ct.typeOf=Ci;uA.exports=ct;var eee=uA.exports;const tee=nr(eee);function nee(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function ree(e){return e.join(" ").trim()}function iee(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var P3={exports:{}},jC=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,oee=/\n/g,aee=/^\s*/,see=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lee=/^:\s*/,cee=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,uee=/^[;\s]*/,dee=/^\s+|\s+$/g,fee=`
`,EC="/",RC="*",rs="",pee="comment",hee="declaration",mee=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var v=y.match(oee);v&&(n+=v.length);var _=y.lastIndexOf(fee);r=~_?y.length-_:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new a(y),l(),v}}function a(y){this.start=y,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(y){var v=new Error(t.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function u(y){var v=y.exec(e);if(v){var _=v[0];return i(_),e=e.slice(_.length),v}}function l(){u(aee)}function d(y){var v;for(y=y||[];v=f();)v!==!1&&y.push(v);return y}function f(){var y=o();if(!(EC!=e.charAt(0)||RC!=e.charAt(1))){for(var v=2;rs!=e.charAt(v)&&(RC!=e.charAt(v)||EC!=e.charAt(v+1));)++v;if(v+=2,rs===e.charAt(v-1))return s("End of comment missing");var _=e.slice(2,v-2);return r+=2,i(_),e=e.slice(v),r+=2,y({type:pee,comment:_})}}function m(){var y=o(),v=u(see);if(v){if(f(),!u(lee))return s("property missing ':'");var _=u(cee),x=y({type:hee,property:PC(v[0].replace(jC,rs)),value:_?PC(_[0].replace(jC,rs)):rs});return u(uee),x}}function g(){var y=[];d(y);for(var v;v=m();)v!==!1&&(y.push(v),d(y));return y}return l(),g()};function PC(e){return e?e.replace(dee,rs):rs}var gee=mee;function fA(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=gee(e),o=typeof t=="function",a,s,u=0,l=i.length;u<l;u++)r=i[u],a=r.property,s=r.value,o?t(a,s,r):s&&(n||(n={}),n[a]=s);return n}P3.exports=fA;P3.exports.default=fA;var vee=P3.exports;const yee=nr(vee),p2={}.hasOwnProperty,bee=new Set(["table","thead","tbody","tfoot","tr"]);function pA(e,t){const n=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?n.push(wee(e,i,r,t)):i.type==="text"?(t.type!=="element"||!bee.has(t.tagName)||!nee(i))&&n.push(i.value):i.type==="raw"&&!e.options.skipHtml&&n.push(i.value);return n}function wee(e,t,n,r){const i=e.options,o=i.transformLinkUri===void 0?jX:i.transformLinkUri,a=e.schema,s=t.tagName,u={};let l=a,d;if(a.space==="html"&&s==="svg"&&(l=XZ,e.schema=l),t.properties)for(d in t.properties)p2.call(t.properties,d)&&See(u,d,t.properties[d],e);(s==="ol"||s==="ul")&&e.listDepth++;const f=pA(e,t);(s==="ol"||s==="ul")&&e.listDepth--,e.schema=a;const m=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},g=i.components&&p2.call(i.components,s)?i.components[s]:s,y=typeof g=="string"||g===le.Fragment;if(!tee.isValidElementType(g))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(u.key=n,s==="a"&&i.linkTarget&&(u.target=typeof i.linkTarget=="function"?i.linkTarget(String(u.href||""),t.children,typeof u.title=="string"?u.title:null):i.linkTarget),s==="a"&&o&&(u.href=o(String(u.href||""),t.children,typeof u.title=="string"?u.title:null)),!y&&s==="code"&&r.type==="element"&&r.tagName!=="pre"&&(u.inline=!0),!y&&(s==="h1"||s==="h2"||s==="h3"||s==="h4"||s==="h5"||s==="h6")&&(u.level=Number.parseInt(s.charAt(1),10)),s==="img"&&i.transformImageUri&&(u.src=i.transformImageUri(String(u.src||""),String(u.alt||""),typeof u.title=="string"?u.title:null)),!y&&s==="li"&&r.type==="element"){const v=xee(t);u.checked=v&&v.properties?!!v.properties.checked:null,u.index=m1(r,t),u.ordered=r.tagName==="ol"}return!y&&(s==="ol"||s==="ul")&&(u.ordered=s==="ol",u.depth=e.listDepth),(s==="td"||s==="th")&&(u.align&&(u.style||(u.style={}),u.style.textAlign=u.align,delete u.align),y||(u.isHeader=s==="th")),!y&&s==="tr"&&r.type==="element"&&(u.isHeader=r.tagName==="thead"),i.sourcePos&&(u["data-sourcepos"]=kee(m)),!y&&i.rawSourcePos&&(u.sourcePosition=t.position),!y&&i.includeElementIndex&&(u.index=m1(r,t),u.siblingCount=m1(r)),y||(u.node=t),f.length>0?le.createElement(g,u,f):le.createElement(g,u)}function xee(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function m1(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function See(e,t,n,r){const i=qZ(r.schema,t);let o=n;o==null||o!==o||(Array.isArray(o)&&(o=i.commaSeparated?iee(o):ree(o)),i.property==="style"&&typeof o=="string"&&(o=Cee(o)),i.space&&i.property?e[p2.call(kC,i.property)?kC[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function Cee(e){const t={};try{yee(e,n)}catch{}return t;function n(r,i){const o=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[o.replace(/-([a-z])/g,_ee)]=i}}function _ee(e,t){return t.toUpperCase()}function kee(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const AC={}.hasOwnProperty,jee="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ep={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function hA(e){for(const o in ep)if(AC.call(ep,o)&&AC.call(e,o)){const a=ep[o];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${o}\` (see <${jee}#${a.id}> for more info)`),delete ep[o]}const t=HX().use(GJ).use(e.remarkPlugins||[]).use($Z,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(QZ,e),n=new AP;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=le.createElement(le.Fragment,{},pA({options:e,schema:YZ,listDepth:0},r));return e.className&&(i=le.createElement("div",{className:e.className},i)),i}hA.propTypes={children:te.string,className:te.string,allowElement:te.func,allowedElements:te.arrayOf(te.string),disallowedElements:te.arrayOf(te.string),unwrapDisallowed:te.bool,remarkPlugins:te.arrayOf(te.oneOfType([te.object,te.func,te.arrayOf(te.oneOfType([te.bool,te.string,te.object,te.func,te.arrayOf(te.any)]))])),rehypePlugins:te.arrayOf(te.oneOfType([te.object,te.func,te.arrayOf(te.oneOfType([te.bool,te.string,te.object,te.func,te.arrayOf(te.any)]))])),sourcePos:te.bool,rawSourcePos:te.bool,skipHtml:te.bool,includeElementIndex:te.bool,transformLinkUri:te.oneOfType([te.func,te.bool]),linkTarget:te.oneOfType([te.func,te.string]),transformImageUri:te.func,components:te.object};const Eee={tokenize:Oee,partial:!0},mA={tokenize:Dee,partial:!0},gA={tokenize:Nee,partial:!0},vA={tokenize:Mee,partial:!0},Ree={tokenize:$ee,partial:!0},yA={tokenize:Iee,previous:wA},bA={tokenize:Tee,previous:xA},Bo={tokenize:Aee,previous:SA},co={},Pee={text:co};let Xa=48;for(;Xa<123;)co[Xa]=Bo,Xa++,Xa===58?Xa=65:Xa===91&&(Xa=97);co[43]=Bo;co[45]=Bo;co[46]=Bo;co[95]=Bo;co[72]=[Bo,bA];co[104]=[Bo,bA];co[87]=[Bo,yA];co[119]=[Bo,yA];function Aee(e,t,n){const r=this;let i,o;return a;function a(f){return!h2(f)||!SA.call(r,r.previous)||A3(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return h2(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(Ree,d,l)(f):f===45||f===95||zn(f)?(o=!0,e.consume(f),u):d(f)}function l(f){return e.consume(f),i=!0,u}function d(f){return o&&i&&Zn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Iee(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!wA.call(r,r.previous)||A3(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Eee,e.attempt(mA,e.attempt(gA,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Tee(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&xA.call(r,r.previous)&&!A3(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(Zn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),o?l:(o=!0,u)):n(f)}function l(f){return f===null||lm(f)||vt(f)||Ts(f)||Eg(f)?n(f):e.attempt(mA,e.attempt(gA,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Oee(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function Dee(e,t,n){let r,i,o;return a;function a(l){return l===46||l===95?e.check(vA,u,s)(l):l===null||vt(l)||Ts(l)||l!==45&&Eg(l)?u(l):(o=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!o?n(l):t(l)}}function Nee(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(vA,t,o)(a):a===null||vt(a)||Ts(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function Mee(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||vt(s)||Ts(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||vt(s)||Ts(s)?t(s):r(s)}function o(s){return Zn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Zn(s)?(e.consume(s),a):n(s)}}function $ee(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return zn(o)?n(o):t(o)}}function wA(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function xA(e){return!Zn(e)}function SA(e){return!(e===47||h2(e))}function h2(e){return e===43||e===45||e===46||e===95||zn(e)}function A3(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Lee={tokenize:qee,partial:!0};function Fee(){return{document:{91:{tokenize:Uee,continuation:{tokenize:Wee},exit:Vee}},text:{91:{tokenize:Hee},93:{add:"after",tokenize:zee,resolveTo:Bee}}}}function zee(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!a||!a._balanced)return n(u);const l=Bi(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Bee(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Hee(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(o>999||f===93&&!a||f===null||f===91||vt(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Bi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return vt(f)||(a=!0),o++,e.consume(f),f===92?d:l}function d(f){return f===91||f===92||f===93?(e.consume(f),o++,l):l(f)}}function Uee(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return u;function u(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(a>999||y===93&&!s||y===null||y===91||vt(y))return n(y);if(y===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Bi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return vt(y)||(s=!0),a++,e.consume(y),y===92?f:d}function f(y){return y===91||y===92||y===93?(e.consume(y),a++,d):d(y)}function m(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),Je(e,g,"gfmFootnoteDefinitionWhitespace")):n(y)}function g(y){return t(y)}}function Wee(e,t,n){return e.check(of,t,e.attempt(Lee,t,n))}function Vee(e){e.exit("gfmFootnoteDefinition")}function qee(e,t,n){const r=this;return Je(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Gee(e){let n=(e||{}).singleTilde;const r={tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},m=[["enter",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],g=s.parser.constructs.insideSpan.null;g&&Ur(m,m.length,0,Rg(g,a.slice(l+1,u),s)),Ur(m,m.length,0,[["exit",f,s],["enter",a[u][1],s],["exit",a[u][1],s],["exit",d,s]]),Ur(a,l-1,u-l+3,m),u=l+m.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function o(a,s,u){const l=this.previous,d=this.events;let f=0;return m;function m(y){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(y):(a.enter("strikethroughSequenceTemporary"),g(y))}function g(y){const v=cm(l);if(y===126)return f>1?u(y):(a.consume(y),f++,g);if(f<2&&!n)return u(y);const _=a.exit("strikethroughSequenceTemporary"),x=cm(y);return _._open=!x||x===2&&!!v,_._close=!v||v===2&&!!x,s(y)}}}class Kee{constructor(){this.map=[]}add(t,n,r){Yee(this,t,n,r)}consume(t){if(this.map.sort((o,a)=>o[0]-a[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function Yee(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Xee(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}const Qee={flow:{null:{tokenize:Jee,resolveAll:Zee}}};function Jee(e,t,n){const r=this;let i=0,o=0,a;return s;function s(j){let P=r.events.length-1;for(;P>-1;){const D=r.events[P][1].type;if(D==="lineEnding"||D==="linePrefix")P--;else break}const B=P>-1?r.events[P][1].type:null,W=B==="tableHead"||B==="tableRow"?b:u;return W===b&&r.parser.lazy[r.now().line]?n(j):W(j)}function u(j){return e.enter("tableHead"),e.enter("tableRow"),l(j)}function l(j){return j===124||(a=!0,o+=1),d(j)}function d(j){return j===null?n(j):Ie(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),g):n(j):Ge(j)?Je(e,d,"whitespace")(j):(o+=1,a&&(a=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(j)))}function f(j){return j===null||j===124||vt(j)?(e.exit("data"),d(j)):(e.consume(j),j===92?m:f)}function m(j){return j===92||j===124?(e.consume(j),f):f(j)}function g(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,Ge(j)?Je(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):y(j))}function y(j){return j===45||j===58?_(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):w(j)}function v(j){return Ge(j)?Je(e,_,"whitespace")(j):_(j)}function _(j){return j===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),x):j===45?(o+=1,x(j)):j===null||Ie(j)?p(j):w(j)}function x(j){return j===45?(e.enter("tableDelimiterFiller"),S(j)):w(j)}function S(j){return j===45?(e.consume(j),S):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(j))}function C(j){return Ge(j)?Je(e,p,"whitespace")(j):p(j)}function p(j){return j===124?y(j):j===null||Ie(j)?!a||i!==o?w(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):w(j)}function w(j){return n(j)}function b(j){return e.enter("tableRow"),k(j)}function k(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),k):j===null||Ie(j)?(e.exit("tableRow"),t(j)):Ge(j)?Je(e,k,"whitespace")(j):(e.enter("data"),E(j))}function E(j){return j===null||j===124||vt(j)?(e.exit("data"),k(j)):(e.consume(j),j===92?I:E)}function I(j){return j===92||j===124?(e.consume(j),E):E(j)}}function Zee(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,u=0,l,d,f;const m=new Kee;for(;++n<e.length;){const g=e[n],y=g[1];g[0]==="enter"?y.type==="tableHead"?(s=!1,u!==0&&(IC(m,t,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",l,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},m.add(n,0,[["enter",d,t]])),i=y.type==="tableDelimiterRow"?2:d?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=tp(m,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=tp(m,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):y.type==="tableHead"?(s=!0,u=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(u=n,o[1]!==0?(a[0]=a[1],f=tp(m,t,o,i,n,f)):a[1]!==0&&(f=tp(m,t,a,i,n,f)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&IC(m,t,u,l,d),m.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=Xee(t.events,n))}return e}function tp(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},ml(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=ml(t.events,n[1]);if(o={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const l=ml(t.events,n[2]),d=ml(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],g=t.events[n[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,v=n[3]-n[2]-1;e.add(y,v,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},ml(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function IC(e,t,n,r,i){const o=[],a=ml(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function ml(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ete={tokenize:nte},tte={text:{91:ete}};function nte(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return vt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Ie(u)?t(u):Ge(u)?e.check({tokenize:rte},t,n)(u):n(u)}}function rte(e,t,n){return Je(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ite(e){return NP([Pee,Fee(),Gee(e),Qee,tte])}function TC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ote(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const ate={}.hasOwnProperty,ste=function(e,t,n,r){let i,o;typeof t=="string"||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});const a=C3(i.ignore||[]),s=lte(o);let u=-1;for(;++u<s.length;)ZP(e,"text",l);return e;function l(f,m){let g=-1,y;for(;++g<m.length;){const v=m[g];if(a(v,y?y.children.indexOf(v):void 0,y))return;y=v}if(y)return d(f,m)}function d(f,m){const g=m[m.length-1],y=s[u][0],v=s[u][1];let _=0;const x=g.children.indexOf(f);let S=!1,C=[];y.lastIndex=0;let p=y.exec(f.value);for(;p;){const w=p.index,b={index:p.index,input:p.input,stack:[...m,f]};let k=v(...p,b);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k!==!1&&(_!==w&&C.push({type:"text",value:f.value.slice(_,w)}),Array.isArray(k)?C.push(...k):k&&C.push(k),_=w+p[0].length,S=!0),!y.global)break;p=y.exec(f.value)}return S?(_<f.value.length&&C.push({type:"text",value:f.value.slice(_)}),g.children.splice(x,1,...C)):C=[f],x+C.length}};function lte(e){const t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([OC(e[n][0]),DC(e[n][1])])}else{let n;for(n in e)ate.call(e,n)&&t.push([OC(n),DC(e[n])])}return t}function OC(e){return typeof e=="string"?new RegExp(ote(e),"g"):e}function DC(e){return typeof e=="function"?e:()=>e}const g1="phrasing",v1=["autolink","link","image","label"],cte={transforms:[gte],enter:{literalAutolink:dte,literalAutolinkEmail:y1,literalAutolinkHttp:y1,literalAutolinkWww:y1},exit:{literalAutolink:mte,literalAutolinkEmail:hte,literalAutolinkHttp:fte,literalAutolinkWww:pte}},ute={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:g1,notInConstruct:v1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:g1,notInConstruct:v1},{character:":",before:"[ps]",after:"\\/",inConstruct:g1,notInConstruct:v1}]};function dte(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function y1(e){this.config.enter.autolinkProtocol.call(this,e)}function fte(e){this.config.exit.autolinkProtocol.call(this,e)}function pte(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function hte(e){this.config.exit.autolinkEmail.call(this,e)}function mte(e){this.exit(e)}function gte(e){ste(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vte],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,yte]],{ignore:["link","linkReference"]})}function vte(e,t,n,r,i){let o="";if(!CA(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!bte(n)))return!1;const a=wte(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function yte(e,t,n,r){return!CA(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bte(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wte(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=TC(e,"(");let o=TC(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function CA(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ts(n)||Eg(n))&&(!t||n!==47)}function _A(e){return e.label||!e.identifier?e.label||"":qP(e.identifier)}function xte(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),a=[];let s=-1;for(r.push(-1);++s<i.length;){const u=i[s];r[r.length-1]=s,a.push(o.move(t.handle(u,e,t,{before:`
`,after:`
`,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(Ste(u,i[s+1],e,t)))}return r.pop(),a.join("")}function Ste(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
`.repeat(1+o);if(o===!1)return`
<!---->
`}return`
`}const Cte=/\r?\n|\r/g;function _te(e,t){const n=[];let r=0,i=0,o;for(;o=Cte.exec(e);)a(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return a(e.slice(r)),n.join("");function a(s){n.push(t(s,i,!s))}}function kA(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function kte(e,t){return NC(e,t.inConstruct,!0)&&!NC(e,t.notInConstruct,!1)}function NC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jA(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],a={};let s=-1;for(;++s<e.unsafe.length;){const d=e.unsafe[s];if(!kte(e.stack,d))continue;const f=kA(d);let m;for(;m=f.exec(r);){const g="before"in d||!!d.atBreak,y="after"in d,v=m.index+(g?m[1].length:0);i.includes(v)?(a[v].before&&!g&&(a[v].before=!1),a[v].after&&!y&&(a[v].after=!1)):(i.push(v),a[v]={before:g,after:y})}}i.sort(jte);let u=n.before?n.before.length:0;const l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){const d=i[s];d<u||d>=l||d+1<l&&i[s+1]===d+1&&a[d].after&&!a[d+1].before&&!a[d+1].after||i[s-1]===d-1&&a[d].before&&!a[d-1].before&&!a[d-1].after||(u!==d&&o.push(MC(r.slice(u,d),"\\")),u=d,/[!-/:-@[-`{-~]/.test(r.charAt(d))&&(!n.encode||!n.encode.includes(r.charAt(d)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(d).toString(16).toUpperCase()+";"),u++))}return o.push(MC(r.slice(u,l),n.after)),o.join("")}function jte(e,t){return e-t}function MC(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let a=-1,s=0,u;for(;u=n.exec(o);)r.push(u.index);for(;++a<r.length;)s!==r[a]&&i.push(e.slice(s,r[a])),i.push("\\"),s=r[a];return i.push(e.slice(s)),i.join("")}function zg(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:u,current:a,shift:s};function a(){return{now:{line:i,column:o},lineShift:r}}function s(l){r+=l}function u(l){const d=l||"",f=d.split(/\r?\n|\r/g),m=f[f.length-1];return i+=f.length-1,o=f.length===1?o+m.length:1+m.length+r,d}}EA.peek=$te;function Ete(){return{enter:{gfmFootnoteDefinition:Pte,gfmFootnoteDefinitionLabelString:Ate,gfmFootnoteCall:Ote,gfmFootnoteCallString:Dte},exit:{gfmFootnoteDefinition:Tte,gfmFootnoteDefinitionLabelString:Ite,gfmFootnoteCall:Mte,gfmFootnoteCallString:Nte}}}function Rte(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Lte,footnoteReference:EA}}}function Pte(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ate(){this.buffer()}function Ite(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Bi(this.sliceSerialize(e)).toLowerCase()}function Tte(e){this.exit(e)}function Ote(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Dte(){this.buffer()}function Nte(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Bi(this.sliceSerialize(e)).toLowerCase()}function Mte(e){this.exit(e)}function EA(e,t,n,r){const i=zg(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(jA(n,_A(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function $te(){return"["}function Lte(e,t,n,r){const i=zg(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(jA(n,_A(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(_te(xte(e,n,i.current()),Fte)),a(),o}function Fte(e,t,n){return t===0?e:(n?"":" ")+e}function RA(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let a=-1,s=n.before;r.push(-1);let u=t.createTracker(n);for(;++a<i.length;){const l=i[a];let d;if(r[r.length-1]=a,a+1<i.length){let f=t.handle.handlers[i[a+1].type];f&&f.peek&&(f=f.peek),d=f?f(i[a+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else d=n.after;o.length>0&&(s==="\r"||s===`
`)&&l.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",u=t.createTracker(n),u.move(o.join(""))),o.push(u.move(t.handle(l,e,t,{...u.current(),before:s,after:d}))),s=o[o.length-1].slice(-1)}return r.pop(),o.join("")}const zte=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];PA.peek=Vte;const Bte={canContainEols:["delete"],enter:{strikethrough:Ute},exit:{strikethrough:Wte}},Hte={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zte}],handlers:{delete:PA}};function Ute(e){this.enter({type:"delete",children:[]},e)}function Wte(e){this.exit(e)}function PA(e,t,n,r){const i=zg(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=RA(e,n,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Vte(){return"~"}AA.peek=qte;function AA(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=kA(a);let u;if(a.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function qte(){return"`"}function Gte(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Yte,i=[],o=[],a=[],s=[];let u=0,l=-1;for(;++l<e.length;){const y=[],v=[];let _=-1;for(e[l].length>u&&(u=e[l].length);++_<e[l].length;){const x=Kte(e[l][_]);if(t.alignDelimiters!==!1){const S=r(x);v[_]=S,(s[_]===void 0||S>s[_])&&(s[_]=S)}y.push(x)}o[l]=y,a[l]=v}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)i[d]=$C(n[d]);else{const y=$C(n);for(;++d<u;)i[d]=y}d=-1;const f=[],m=[];for(;++d<u;){const y=i[d];let v="",_="";y===99?(v=":",_=":"):y===108?v=":":y===114&&(_=":");let x=t.alignDelimiters===!1?1:Math.max(1,s[d]-v.length-_.length);const S=v+"-".repeat(x)+_;t.alignDelimiters!==!1&&(x=v.length+x+_.length,x>s[d]&&(s[d]=x),m[d]=x),f[d]=S}o.splice(1,0,f),a.splice(1,0,m),l=-1;const g=[];for(;++l<o.length;){const y=o[l],v=a[l];d=-1;const _=[];for(;++d<u;){const x=y[d]||"";let S="",C="";if(t.alignDelimiters!==!1){const p=s[d]-(v[d]||0),w=i[d];w===114?S=" ".repeat(p):w===99?p%2?(S=" ".repeat(p/2+.5),C=" ".repeat(p/2-.5)):(S=" ".repeat(p/2),C=S):C=" ".repeat(p)}t.delimiterStart!==!1&&!d&&_.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&x==="")&&(t.delimiterStart!==!1||d)&&_.push(" "),t.alignDelimiters!==!1&&_.push(S),_.push(x),t.alignDelimiters!==!1&&_.push(C),t.padding!==!1&&_.push(" "),(t.delimiterEnd!==!1||d!==u-1)&&_.push("|")}g.push(t.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return g.join(`
`)}function Kte(e){return e==null?"":String(e)}function Yte(e){return e.length}function $C(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Xte={enter:{table:Qte,tableData:LC,tableHeader:LC,tableRow:Zte},exit:{codeText:ene,table:Jte,tableData:b1,tableHeader:b1,tableRow:b1}};function Qte(e){const t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function Jte(e){this.exit(e),this.setData("inTable")}function Zte(e){this.enter({type:"tableRow",children:[]},e)}function b1(e){this.exit(e)}function LC(e){this.enter({type:"tableCell",children:[]},e)}function ene(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,tne));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function tne(e,t){return t==="|"?t:e}function nne(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:a,tableRow:s,tableCell:u,inlineCode:m}};function a(g,y,v,_){return l(d(g,v,_),g.align)}function s(g,y,v,_){const x=f(g,v,_),S=l([x]);return S.slice(0,S.indexOf(`
`))}function u(g,y,v,_){const x=v.enter("tableCell"),S=v.enter("phrasing"),C=RA(g,v,{..._,before:o,after:o});return S(),x(),C}function l(g,y){return Gte(g,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function d(g,y,v){const _=g.children;let x=-1;const S=[],C=y.enter("table");for(;++x<_.length;)S[x]=f(_[x],y,v);return C(),S}function f(g,y,v){const _=g.children;let x=-1;const S=[],C=y.enter("tableRow");for(;++x<_.length;)S[x]=u(_[x],g,y,v);return C(),S}function m(g,y,v){let _=AA(g,y,v);return v.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function rne(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ine(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function one(e,t,n,r){const i=ine(n);let o=n.bulletCurrent||rne(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),d);return u(),l;function d(f,m,g){return m?(g?"":" ".repeat(a))+f:(g?o:o+" ".repeat(a-o.length))+f}}const ane={exit:{taskListCheckValueChecked:FC,taskListCheckValueUnchecked:FC,paragraph:lne}},sne={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cne}};function FC(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function lne(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cne(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=zg(r);o&&s.move(a);let u=one(e,t,n,{...r,...s.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function une(){return[cte,Ete(),Bte,Xte,ane]}function dne(e){return{extensions:[ute,Rte(),Hte,nne(e),sne]}}function fne(e={}){const t=this.data();n("micromarkExtensions",ite(e)),n("fromMarkdownExtensions",une()),n("toMarkdownExtensions",dne(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}function pne(e,t){if(e.length<=t)return e;const n=e.slice(0,t);if(n.endsWith(`
`))return n+"...";const r=e.slice(t),i=r.indexOf(`
`);return e.slice(0,t+(i===-1?r.length:i))+"..."}function hne(e){let t=e.replace(/#+/g,"");return t=t.replace(/\*+/g,""),t=t.replace(/_+/g,""),t=t.replace(/`+/g,""),t=t.replace(/~+/g,""),t=t.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),t}const It=({text:e,renderGFM:t,maxLength:n,className:r})=>{const[i,o]=h.useState(!0);return n=n||5e3,e?c.jsxs(mne,{className:r,children:[c.jsx(hA,{remarkPlugins:t?[fne]:[],children:i?pne(e,n):e}),e.length>n&&i&&c.jsx(ue,{subtle:!0,onClick:()=>o(!1),children:"Read more "})]}):null};It.defaultProps={renderGFM:!0};const mne=A.div.withConfig({displayName:"Markdown__MarkdownWrapper",componentId:"sc-506ee41e-0"})(["width:100%;overflow-x:hidden;img{max-width:100%;}*{white-space:unset;}p,h1,h2,h3,h4,h5,h6{margin-bottom:1.5rem;}p:only-child{margin-bottom:0;}blockquote{margin-inline-start:0rem;padding-inline-start:1rem;border-inline-start:solid 3px ",";color:",";}pre code{white-space:pre-wrap;padding:1rem;width:100%;border-radius:",";}table{margin-bottom:1.5rem;width:100%;}table,thead,tbody,th,td{border-collapse:collapse;padding:0.5rem;border:1px solid ",";}"],e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.radius,e=>e.theme.colors.bg2);function gne({children:e,subtle:t,title:n,icon:r,onClick:i,IconComponent:o,label:a,className:s}){const l=be().getAgent(),d=xt(),f=h.useCallback(()=>{if(!l){lt.error("You need to be logged in to create new things"),d(Fe.agentSettings);return}i()},[l,d]),m=o??qn;return c.jsxs(ue,{onClick:f,subtle:t,title:l?`Create a new ${n}`:"No User set - sign in first",className:s,children:[r?c.jsxs(vne,{children:[c.jsx(m,{}),a]}):a??n,e]})}const vne=A.div.withConfig({displayName:"Base__IconWrapper",componentId:"sc-8dc8d4b9-0"})(["display:flex;align-items:center;gap:0.5rem;"]);function kd({klass:e,subtle:t,icon:n,IconComponent:r,parent:i,children:o,label:a,className:s}){const{drive:u}=Xe(),l=ae(e),d=m3(),f=()=>{d(e,i??u)};return c.jsx(gne,{className:s,onClick:f,IconComponent:r,title:l.title,icon:n,subtle:t,label:a,children:o})}var m2=new Map,np=new WeakMap,zC=0,yne=void 0;function bne(e){return e?(np.has(e)||(zC+=1,np.set(e,zC.toString())),np.get(e)):"0"}function wne(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?bne(e.root):e[t]}`).toString()}function xne(e){let t=wne(e),n=m2.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(a=>{a.forEach(s=>{var u;const l=s.isIntersecting&&i.some(d=>s.intersectionRatio>=d);e.trackVisibility&&typeof s.isVisible>"u"&&(s.isVisible=l),(u=r.get(s.target))==null||u.forEach(d=>{d(l,s)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},m2.set(t,n)}return n}function Sne(e,t,n={},r=yne){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:i,observer:o,elements:a}=xne(n);let s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),s.length===0&&(a.delete(e),o.unobserve(e)),a.size===0&&(o.disconnect(),m2.delete(i))}}function Cne({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:u,onChange:l}={}){var d;const[f,m]=h.useState(null),g=h.useRef(),[y,v]=h.useState({inView:!!s,entry:void 0});g.current=l,h.useEffect(()=>{if(a||!f)return;let C;return C=Sne(f,(p,w)=>{v({inView:p,entry:w}),g.current&&g.current(p,w),w.isIntersecting&&o&&C&&(C(),C=void 0)},{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{C&&C()}},[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,u,t]);const _=(d=y.entry)==null?void 0:d.target,x=h.useRef();!f&&_&&!o&&!a&&x.current!==_&&(x.current=_,v({inView:!!s,entry:void 0}));const S=[m,y.inView,y.entry];return S.ref=S[0],S.inView=S[1],S.entry=S[2],S}function I3({date:e}){return c.jsxs("time",{dateTime:e.toISOString(),children:[e.toLocaleDateString()," at ",e.toLocaleTimeString()]})}function _ne({resource:e}){return c.jsx(kne,{children:c.jsx(Vs,{resource:e})})}const kne=A.div.withConfig({displayName:"NestedResource__NestedWrapper",componentId:"sc-15c18500-0"})(["margin-left:","rem;"],e=>e.theme.margin),w1=10;function jne({subjects:e}){const[t,n]=h.useState(!1),r=e.length>w1;let i=e;return!t&&r&&(i=i.slice(0,w1)),c.jsxs(c.Fragment,{children:[i.map((o,a)=>typeof o!="string"?(console.warn(`ResourceArray: subject ${o} isn't a string`,o),null):c.jsxs(h.Fragment,{children:[c.jsx(Ft,{subject:o}),a!==i.length-1&&", "]},o)),r&&c.jsx(Ene,{onClick:()=>n(!t),children:t?"show less":`show ${e.length-w1} more`})]})}const Ene=A.span.withConfig({displayName:"ResourceArray__ShowMoreButton",componentId:"sc-a0005101-0"})(["cursor:pointer;margin-left:0.5em;&:hover{text-decoration:underline;}"]);function IA({value:e,datatype:t}){try{switch(t){case Z.ATOMIC_URL:{const n=Az(e);return typeof n=="string"?c.jsx(Ft,{subject:n}):c.jsx(_ne,{resource:n})}case(Z.DATE,Z.TIMESTAMP):return c.jsx(I3,{date:KE(e)});case Z.MARKDOWN:return c.jsx(It,{text:Ab(e)});case Z.RESOURCEARRAY:return c.jsx(jne,{subjects:Iu(e)});default:return c.jsx("div",{children:Ab(e)})}}catch(n){return c.jsxs(gn,{children:[n.message," original value: ",e==null?void 0:e.toString()]})}}const Rne=$o(["from{opacity:0;top:var(--error-chip-start);}to{opacity:1;top:var(--error-chip-end);}"]),Rc=A.span.withConfig({displayName:"ErrorChip",componentId:"sc-64d81e2-0"})(["--error-chip-end:",";--error-chip-start:calc(var(--error-chip-end) - 0.5rem);position:relative;top:var(--error-chip-end);background-color:",";color:white;padding:0.25rem 0.5rem;border-radius:",";box-shadow:",";"," &::before{--triangle-size:0.5rem;content:'';position:absolute;top:calc(-1 * var(--triangle-size) + 1px);left:1rem;width:var(--triangle-size);aspect-ratio:1/1;background-color:",";clip-path:polygon(0% 100%,100% 100%,50% 0%);}"],e=>e.top??"0.5rem",e=>e.theme.colors.alert,e=>e.theme.radius,e=>e.theme.boxShadowSoft,e=>e.noMovement?"":cn(["animation:"," 0.1s ease-in-out;"],Rne),e=>e.theme.colors.alert),Bg=A(Rc).withConfig({displayName:"ErrorChip__ErrorChipInput",componentId:"sc-64d81e2-1"})(["position:absolute;--error-chip-end:",";"],e=>e.top??"2rem"),TA=h.createContext({validations:{},setValidations:()=>{}});function Hg({children:e,onValidationChange:t}){const[n,r]=h.useState({}),i=h.useCallback(a=>{r(s=>{const u=a(s);return t(Object.values(u).every(l=>l===void 0)),u})},[t]),o=h.useMemo(()=>({validations:n,setValidations:i}),[n]);return c.jsx(TA.Provider,{value:o,children:e})}function Pne(e,t){const n=h.useRef(e),r=h.useRef(t);n.current=e,r.current=t,h.useEffect(()=>(n.current(),()=>{r.current()}),[])}function Ws(e){const t=h.useId(),[n,r]=h.useState(!1),{setValidations:i,validations:o}=h.useContext(TA),a=h.useCallback((l,d=!1)=>{const f=l instanceof Error?l.message:l;i(m=>m[t]===f?m:{...m,[t]:f}),d&&r(!0)},[]),s=h.useCallback(()=>{r(!0)},[]);return Pne(()=>{i(l=>({...l,[t]:e}))},()=>{i(l=>{const{[t]:d,...f}=l;return f})}),[n?o[t]:void 0,a,s]}function g2({resource:e,property:t,commit:n,...r}){const[i,o,a]=Ws(),[s,u]=re(e,t.subject,{commit:n,validate:!1});function l(d){const f=d.target.value;u(f);try{za(f,t.datatype),o(void 0)}catch{o("Invalid value")}r.required&&f===""&&o("Required")}return c.jsxs(Ane,{children:[c.jsx(ht,{$invalid:!!i,children:c.jsx(wt,{value:s===void 0?"":s,onChange:l,...r,onBlur:a})}),i&&c.jsx(Bg,{children:i})]})}const Ane=A.div.withConfig({displayName:"InputString__Wrapper",componentId:"sc-f71d7fe9-0"})(["flex:1;position:relative;"]);function OA(e){const t=h.useRef(!1);h.useEffect(()=>{if(!t.current)return t.current=!0,e()},[])}const DA=(e,t)=>{const n=be(),[r,i]=h.useState(!1),[o,a]=h.useState(void 0);return[h.useCallback(async u=>{u.preventDefault(),i(!0),a(void 0);try{await e.save(n),i(!1),t==null||t(),lt.success("Resource saved"),e.new&&n.notifyResourceManuallyCreated(e)}catch(l){a(l),i(!1),lt.error("Could not save resource")}},[e,n]),r,o]};function Hn({label:e,helper:t,children:n,error:r,handleDelete:i,required:o,disabled:a,fieldId:s}){const[u,l]=h.useState(!0);return c.jsxs(CK,{children:[c.jsx(_K,{children:c.jsxs(Le,{gap:"0.4rem",center:!0,children:[c.jsxs(Ine,{"data-test":`field-label-${e}`,htmlFor:s,children:[c.jsx("span",{children:e}),o&&c.jsx($U,{title:"Required field"})]}),t&&c.jsx(Wt,{variant:Pa.Outline,color:"textLight",type:"button",size:"0.7rem",onClick:()=>l(!u),title:"Show helper",children:c.jsx(lg,{})}),!a&&i&&c.jsx(Wt,{variant:Pa.Outline,title:"Delete this property",color:"textLight",type:"button",size:"0.7rem",onClick:()=>i("test"),children:c.jsx(Ls,{})})]})}),c.jsx(kK,{children:c.jsxs(dg,{open:!u,children:[t,o&&c.jsx("p",{children:"Required field."})]})}),n,r&&c.jsx(gn,{title:`Error: ${JSON.stringify(r)}`,children:r.message})]})}const Ine=A.label.withConfig({displayName:"Field__FieldLabel",componentId:"sc-4824ee90-0"})(["text-transform:capitalize;display:inline-flex;gap:0.2rem;align-items:center;font-weight:bold;svg{color:",";font-size:0.8rem;}"],e=>e.theme.colors.textLight);function Tne(e){return e.error?e.subject.split("/").pop()||"error":e.shortname}function Mr({handleDelete:e,propertyURL:t,resource:n,required:r,autoFocus:i,disabled:o,label:a}){const s=h.useId(),u=qr(t),[l,d]=h.useState(!0);if(u===null)return c.jsx(Hn,{label:a||"loading...",fieldId:s,children:c.jsx(ht,{children:c.jsx(wt,{disabled:o,placeholder:"loading property...",id:s})})});const f=a||u.error?Tne(u):u.shortname;return u.isDynamic&&l?c.jsxs(Hn,{helper:c.jsx(BC,{text:u.description,link:u.subject}),label:f,disabled:o,children:["This field is calculated server-side, edits will not be saved. ",c.jsx(ue,{subtle:!0,onClick:()=>d(!1),children:"edit anyway"})]}):c.jsx(Hn,{helper:c.jsx(BC,{text:u.description,link:u.subject}),label:f,handleDelete:e,required:r,disabled:o,fieldId:s,children:c.jsx(Ic,{id:s,"data-test":`input-${u.shortname}`,resource:n,property:u,required:r,autoFocus:i,disabled:o},t+" input-switcher")})}const One=A.div.withConfig({displayName:"ResourceField__HelperTextWraper",componentId:"sc-b48d4a66-0"})(["position:relative;margin-bottom:0rem;"]);function BC({text:e,link:t}){return c.jsxs(One,{children:[c.jsx(It,{text:e}),c.jsx(Ve,{subject:t,children:t})]})}var Dne=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function sf(e,t){var n=Nne(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Nne(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=Dne.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var Mne=[".DS_Store","Thumbs.db"];function $ne(e){return yc(this,void 0,void 0,function(){return bc(this,function(t){return dm(e)&&Lne(e)?[2,Hne(e.dataTransfer,e.type)]:Fne(e)?[2,zne(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Bne(e)]:[2,[]]})})}function Lne(e){return dm(e.dataTransfer)}function Fne(e){return dm(e)&&dm(e.target)}function dm(e){return typeof e=="object"&&e!==null}function zne(e){return v2(e.target.files).map(function(t){return sf(t)})}function Bne(e){return yc(this,void 0,void 0,function(){var t;return bc(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return sf(r)})]}})})}function Hne(e,t){return yc(this,void 0,void 0,function(){var n,r;return bc(this,function(i){switch(i.label){case 0:return e===null?[2,[]]:e.items?(n=v2(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Une))]):[3,2];case 1:return r=i.sent(),[2,HC(NA(r))];case 2:return[2,HC(v2(e.files).map(function(o){return sf(o)}))]}})})}function HC(e){return e.filter(function(t){return Mne.indexOf(t.name)===-1})}function v2(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Une(e){if(typeof e.webkitGetAsEntry!="function")return UC(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?MA(t):UC(e)}function NA(e){return e.reduce(function(t,n){return eB(t,Array.isArray(n)?NA(n):[n])},[])}function UC(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=sf(t);return Promise.resolve(n)}function Wne(e){return yc(this,void 0,void 0,function(){return bc(this,function(t){return[2,e.isDirectory?MA(e):Vne(e)]})})}function MA(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return yc(a,void 0,void 0,function(){var u,l,d;return bc(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=f.sent(),n(u),[3,4];case 3:return l=f.sent(),r(l),[3,4];case 4:return[3,6];case 5:d=Promise.all(s.map(Wne)),i.push(d),o(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function Vne(e){return yc(this,void 0,void 0,function(){return bc(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=sf(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var qne=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function WC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WC(Object(n),!0).forEach(function(r){$A(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qC(e,t){return Xne(e)||Yne(e,t)||Kne(e,t)||Gne()}function Gne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kne(e,t){if(e){if(typeof e=="string")return GC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GC(e,t)}}function GC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(u){o=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function Xne(e){if(Array.isArray(e))return e}var Qne="file-invalid-type",Jne="file-too-large",Zne="file-too-small",ere="too-many-files",tre=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Qne,message:"File type must be ".concat(n)}},KC=function(t){return{code:Jne,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},YC=function(t){return{code:Zne,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nre={code:ere,message:"Too many files"};function LA(e,t){var n=e.type==="application/x-moz-file"||qne(e,t);return[n,n?null:tre(t)]}function FA(e,t,n){if(nu(e.size))if(nu(t)&&nu(n)){if(e.size>n)return[!1,KC(n)];if(e.size<t)return[!1,YC(t)]}else{if(nu(t)&&e.size<t)return[!1,YC(t)];if(nu(n)&&e.size>n)return[!1,KC(n)]}return[!0,null]}function nu(e){return e!=null}function rre(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(s){var u=LA(s,n),l=qC(u,1),d=l[0],f=FA(s,r,i),m=qC(f,1),g=m[0];return d&&g})}function fm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function rp(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function XC(e){e.preventDefault()}function ire(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ore(e){return e.indexOf("Edge/")!==-1}function are(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ire(e)||ore(e)}function Ki(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!fm(r)&&s&&s.apply(void 0,[r].concat(o)),fm(r)})}}function QC(){return"showOpenFilePicker"in window}function sre(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}).reduce(function(t,n){return VC(VC({},t),{},$A({},n,[]))},{}):{}}]}var lre=["children"],cre=["open"],ure=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],dre=["refKey","onChange","onClick"];function fre(e){return mre(e)||hre(e)||zA(e)||pre()}function pre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mre(e){if(Array.isArray(e))return y2(e)}function x1(e,t){return yre(e)||vre(e,t)||zA(e,t)||gre()}function gre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(e,t){if(e){if(typeof e=="string")return y2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y2(e,t)}}function y2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(u){o=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function yre(e){if(Array.isArray(e))return e}function JC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JC(Object(n),!0).forEach(function(r){b2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pm(e,t){if(e==null)return{};var n=bre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var T3=h.forwardRef(function(e,t){var n=e.children,r=pm(e,lre),i=Ug(r),o=i.open,a=pm(i,cre);return h.useImperativeHandle(t,function(){return{open:o}},[o]),le.createElement(h.Fragment,null,n(Ot(Ot({},a),{},{open:o})))});T3.displayName="Dropzone";var BA={disabled:!1,getFilesFromEvent:$ne,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};T3.defaultProps=BA;T3.propTypes={children:te.func,accept:te.oneOfType([te.string,te.arrayOf(te.string)]),multiple:te.bool,preventDropOnDocument:te.bool,noClick:te.bool,noKeyboard:te.bool,noDrag:te.bool,noDragEventsBubbling:te.bool,minSize:te.number,maxSize:te.number,maxFiles:te.number,disabled:te.bool,getFilesFromEvent:te.func,onFileDialogCancel:te.func,onFileDialogOpen:te.func,useFsAccessApi:te.bool,onDragEnter:te.func,onDragLeave:te.func,onDragOver:te.func,onDrop:te.func,onDropAccepted:te.func,onDropRejected:te.func,validator:te.func};var w2={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Ug(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ot(Ot({},BA),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,l=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,m=t.onDrop,g=t.onDropAccepted,y=t.onDropRejected,v=t.onFileDialogCancel,_=t.onFileDialogOpen,x=t.useFsAccessApi,S=t.preventDropOnDocument,C=t.noClick,p=t.noKeyboard,w=t.noDrag,b=t.noDragEventsBubbling,k=t.validator,E=h.useMemo(function(){return typeof _=="function"?_:ZC},[_]),I=h.useMemo(function(){return typeof v=="function"?v:ZC},[v]),j=h.useRef(null),P=h.useRef(null),B=h.useReducer(wre,w2),W=x1(B,2),D=W[0],L=W[1],T=D.isFocused,V=D.isFileDialogActive,H=D.draggedFiles,q=function(){V&&setTimeout(function(){if(P.current){var De=P.current.files;De.length||(L({type:"closeDialog"}),I())}},300)};h.useEffect(function(){return x&&QC()?function(){}:(window.addEventListener("focus",q,!1),function(){window.removeEventListener("focus",q,!1)})},[P,V,I,x]);var N=h.useRef([]),J=function(De){j.current&&j.current.contains(De.target)||(De.preventDefault(),N.current=[])};h.useEffect(function(){return S&&(document.addEventListener("dragover",XC,!1),document.addEventListener("drop",J,!1)),function(){S&&(document.removeEventListener("dragover",XC),document.removeEventListener("drop",J))}},[j,S]);var se=h.useCallback(function(me){me.preventDefault(),me.persist(),Bt(me),N.current=[].concat(fre(N.current),[me.target]),rp(me)&&Promise.resolve(i(me)).then(function(De){fm(me)&&!b||(L({draggedFiles:De,isDragActive:!0,type:"setDraggedFiles"}),l&&l(me))})},[i,l,b]),z=h.useCallback(function(me){me.preventDefault(),me.persist(),Bt(me);var De=rp(me);if(De&&me.dataTransfer)try{me.dataTransfer.dropEffect="copy"}catch{}return De&&f&&f(me),!1},[f,b]),Ce=h.useCallback(function(me){me.preventDefault(),me.persist(),Bt(me);var De=N.current.filter(function(qt){return j.current&&j.current.contains(qt)}),St=De.indexOf(me.target);St!==-1&&De.splice(St,1),N.current=De,!(De.length>0)&&(L({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),rp(me)&&d&&d(me))},[j,d,b]),Ee=h.useCallback(function(me,De){var St=[],qt=[];me.forEach(function(Cn){var X=LA(Cn,n),ie=x1(X,2),_e=ie[0],qe=ie[1],$e=FA(Cn,a,o),Ht=x1($e,2),_n=Ht[0],kn=Ht[1],cr=k?k(Cn):null;if(_e&&_n&&!cr)St.push(Cn);else{var kr=[qe,kn];cr&&(kr=kr.concat(cr)),qt.push({file:Cn,errors:kr.filter(function(at){return at})})}}),(!s&&St.length>1||s&&u>=1&&St.length>u)&&(St.forEach(function(Cn){qt.push({file:Cn,errors:[nre]})}),St.splice(0)),L({acceptedFiles:St,fileRejections:qt,type:"setFiles"}),m&&m(St,qt,De),qt.length>0&&y&&y(qt,De),St.length>0&&g&&g(St,De)},[L,s,n,a,o,u,m,g,y,k]),ye=h.useCallback(function(me){me.preventDefault(),me.persist(),Bt(me),N.current=[],rp(me)&&Promise.resolve(i(me)).then(function(De){fm(me)&&!b||Ee(De,me)}),L({type:"reset"})},[i,Ee,b]),Re=h.useCallback(function(){if(x&&QC()){L({type:"openDialog"}),E();var me={multiple:s,types:sre(n)};window.showOpenFilePicker(me).then(function(De){return i(De)}).then(function(De){return Ee(De,null)}).catch(function(De){return I(De)}).finally(function(){return L({type:"closeDialog"})});return}P.current&&(L({type:"openDialog"}),E(),P.current.value=null,P.current.click())},[L,E,I,x,Ee,n,s]),Oe=h.useCallback(function(me){!j.current||!j.current.isEqualNode(me.target)||(me.keyCode===32||me.keyCode===13)&&(me.preventDefault(),Re())},[j,P,Re]),rt=h.useCallback(function(){L({type:"focus"})},[]),Pe=h.useCallback(function(){L({type:"blur"})},[]),zt=h.useCallback(function(){C||(are()?setTimeout(Re,0):Re())},[P,C,Re]),dt=function(De){return r?null:De},tn=function(De){return p?null:dt(De)},Tt=function(De){return w?null:dt(De)},Bt=function(De){b&&De.stopPropagation()},Sn=h.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},De=me.refKey,St=De===void 0?"ref":De,qt=me.role,Cn=me.onKeyDown,X=me.onFocus,ie=me.onBlur,_e=me.onClick,qe=me.onDragEnter,$e=me.onDragOver,Ht=me.onDragLeave,_n=me.onDrop,kn=pm(me,ure);return Ot(Ot(b2({onKeyDown:tn(Ki(Cn,Oe)),onFocus:tn(Ki(X,rt)),onBlur:tn(Ki(ie,Pe)),onClick:dt(Ki(_e,zt)),onDragEnter:Tt(Ki(qe,se)),onDragOver:Tt(Ki($e,z)),onDragLeave:Tt(Ki(Ht,Ce)),onDrop:Tt(Ki(_n,ye)),role:typeof qt=="string"&&qt!==""?qt:"button"},St,j),!r&&!p?{tabIndex:0}:{}),kn)}},[j,Oe,rt,Pe,zt,se,z,Ce,ye,p,w,r]),un=h.useCallback(function(me){me.stopPropagation()},[]),_i=h.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},De=me.refKey,St=De===void 0?"ref":De,qt=me.onChange,Cn=me.onClick,X=pm(me,dre),ie=b2({accept:n,multiple:s,type:"file",style:{display:"none"},onChange:dt(Ki(qt,ye)),onClick:dt(Ki(Cn,un)),autoComplete:"off",tabIndex:-1},St,P);return Ot(Ot({},ie),X)}},[P,n,s,ye,r]),Zr=H.length,Vt=Zr>0&&rre({files:H,accept:n,minSize:a,maxSize:o,multiple:s,maxFiles:u}),ei=Zr>0&&!Vt;return Ot(Ot({},D),{},{isDragAccept:Vt,isDragReject:ei,isFocused:T&&!r,getRootProps:Sn,getInputProps:_i,rootRef:j,inputRef:P,open:dt(Re)})}function wre(e,t){switch(t.type){case"focus":return Ot(Ot({},e),{},{isFocused:!0});case"blur":return Ot(Ot({},e),{},{isFocused:!1});case"openDialog":return Ot(Ot({},w2),{},{isFileDialogActive:!0});case"closeDialog":return Ot(Ot({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Ot(Ot({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Ot(Ot({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ot({},w2);default:return e}}function ZC(){}function xre({subject:e}){const t=ae(e),[n]=nt(t);return c.jsx(Sre,{"data-test":"file-pill",children:c.jsx(Ve,{subject:t.getSubject(),children:c.jsx("span",{children:n})})})}const Sre=A.div.withConfig({displayName:"FilePill__FilePillStyled",componentId:"sc-e7381fdc-0"})(["display:inline-flex;border:solid 1px ",";border-radius:",";padding:0.4rem;margin-bottom:","rem;margin-right:","rem;"],e=>e.theme.colors.main,e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.margin),Cre={commit:!0};function O3(e){const t=be(),[n,r]=h.useState(!1),[i,o]=h.useState(void 0),[a,s]=Se(e,K.subResources,Cre);return{upload:h.useCallback(async l=>{try{o(void 0),r(!0);const f=[...await t.uploadFiles(l,e.getSubject())];return r(!1),s([...a,...f]),f}catch(d){return o(new Nr(d==null?void 0:d.message)),r(!1),[]}},[e,t,s,a]),isUploading:n,error:i}}function HA({parentResource:e}){const[t,n]=h.useState([]),{upload:r,isUploading:i,error:o}=O3(e),a=h.useCallback(async d=>{const f=await r(d);n(f)},[r]),{getRootProps:s,getInputProps:u,isDragActive:l}=Ug({onDrop:a});return e.new?c.jsx("p",{children:"You can add attachments after saving the resource."}):c.jsxs("div",{children:[c.jsxs("div",{...s(),children:[c.jsx("input",{...u()}),l?c.jsx("p",{children:"Drop the files here ..."}):c.jsx(ue,{subtle:!0,onClick:()=>null,loading:i?"Uploading...":void 0,children:"Upload file(s)..."}),o&&c.jsx(gn,{children:o.message})]}),t.length>0&&t.map(d=>c.jsx(xre,{subject:d},d))]})}const _re=A.div.withConfig({displayName:"Gutter",componentId:"sc-ae6f9552-0"})(["height:","rem;"],e=>e.theme.margin);var x2;(function(e){e[e.Default=0]="Default",e[e.Dialog=1]="Dialog"})(x2||(x2={}));const kre=[K.isA,K.parent,K.read,K.write,K.commit.lastCommit];function Wg({classSubject:e,resource:t,variant:n,onSave:r}){const[i]=Se(t,K.isA);e===void 0&&(i==null?void 0:i.length)>0&&(e=i[0]);const o=ae(e),[a]=Se(o,K.requires),[s]=Se(o,K.recommends),[u]=re(o,K.isA),[l,d]=h.useState(void 0),f=xt(),[m,g]=h.useState([]),[y,v]=h.useState(!1),_=be(),x=t.new,[S,C,p]=DA(t,()=>{x&&_.notifyResourceManuallyCreated(t),r==null||r(),f(mt(t.getSubject()))}),w=Wh(t,5e3),[b,k]=Sr(w),E=h.useMemo(()=>[...Array.from(t.getPropVals().keys()).filter(W=>{const D=!(a.includes(W)||s.includes(W)||m.includes(W)),L=!kre.includes(W);return D&&L}),...m],[t,m,a.length,s.length]);if(!t.new&&t.loading)return c.jsx(c.Fragment,{children:"Loading resource..."});if(t.error)return c.jsx(gn,{children:t.error.message});if(o.loading)return c.jsx(c.Fragment,{children:"Loading class..."});if(u&&u!==ft.class)return c.jsxs(gn,{children:[e," is not a Class. Only resources with valid classes can be created or edited at this moment."]});function I(P){if(d(void 0),!bn.isValidSubject(P)){d(new Error("Invalid URL"));return}P&&(m.includes(P)||a.includes(P)||s.includes(P)?d(new Error("That property already exists in this resource. It can only be added once.")):g(B=>[...B,P]))}function j(P){t.removePropVal(P),g(m.filter(B=>B!==P))}return c.jsxs("form",{about:t.getSubject(),onSubmit:S,children:[e&&o.error&&c.jsxs(gn,{children:["Error in class, so this form could miss properties. You can still edit the resource, though. Error message: `",o.error.message,"`"]}),k&&c.jsxs(gn,{children:["Cannot save edits: ",k]}),a.map(P=>c.jsx(Mr,{propertyURL:P,resource:t,required:!0},P+" field")),s.map(P=>c.jsx(Mr,{propertyURL:P,resource:t},P+" field")),E.map(P=>c.jsx(Mr,{propertyURL:P,resource:t,handleDelete:()=>j(P)},P+" field")),c.jsxs(Hn,{label:"add another property...",helper:"In Atomic Data, any Resource could have any single Property. Use this field to add new property-value combinations to your resource.",children:[c.jsx("div",{children:c.jsx(Ho,{value:void 0,setSubject:P=>{I(P)},error:l,isA:F.classes.property})}),l&&c.jsx(gn,{children:l.message})]}),c.jsx(HA,{parentResource:t}),c.jsx(_re,{}),c.jsx(ue,{title:"show / hide advanced form fields",clean:!0,style:{display:"flex",marginBottom:"1rem",alignItems:"center"},onClick:()=>v(!y),children:c.jsxs(Le,{as:"strong",gap:"0.4rem",center:!0,children:[y?c.jsx(M9,{}):c.jsx(Nx,{})," Advanced Options"]})}),c.jsxs(dg,{open:y,children:[c.jsx(Mr,{propertyURL:K.isA,resource:t}),c.jsx(Mr,{propertyURL:K.parent,resource:t}),c.jsx(Mr,{propertyURL:K.write,resource:t}),c.jsx(Mr,{propertyURL:K.read,resource:t}),c.jsx(Mr,{propertyURL:K.commit.lastCommit,resource:t})]}),n!==1&&c.jsxs(c.Fragment,{children:[p&&c.jsx(gn,{children:p.message}),c.jsx(ue,{disabled:C,"data-test":"save",type:"submit",children:C?"wait...":"save"})]})]})}Wg.defaultProps={variant:0};var S2;(function(e){e[e.FullPage=0]="FullPage",e[e.Dialog=1]="Dialog"})(S2||(S2={}));const jre=new Map([[0,"h2"],[1,"h1"]]),UA=({classSubject:e,variant:t})=>{const n=ae(e),[r]=nt(n),[i]=re(n,K.description),[o,a]=h.useState(!1),s=jre.get(t)??"h2";return c.jsxs(Ne,{children:[c.jsxs(Le,{center:!0,children:[c.jsxs(Ere,{as:s,children:["new"," ",e?c.jsx(Ve,{subject:e,children:r}):"Resource"]}),c.jsx(Wt,{variant:Pa.Outline,onClick:()=>a(!o),title:"Toggle show Class details",children:c.jsx(lg,{})})]}),o&&i&&c.jsx(It,{text:i})]})},Ere=A.h1.withConfig({displayName:"NewFormTitle__Heading",componentId:"sc-18e33f92-0"})(["margin:0;"]),WA=({error:e,value:t,onChange:n})=>c.jsx(Hn,{error:e,label:"subject",helper:"The identifier of the resource. This also determines where the resource is saved, by default.",children:c.jsx(ht,{children:c.jsx(wt,{value:t,onChange:r=>n(r.target.value),placeholder:"URL of the new resource..."})})}),Rre={newResource:!0},VA=e=>{const{klass:t,setSubject:n,initialSubject:r,parent:i}=e,o=be(),[a,s]=h.useState(!1),[u,l]=h.useState(()=>r===void 0?o.createSubject(t.props.shortname):r),[d,f]=h.useState(void 0),m=ae(u,Rre),[g]=re(m,K.parent),[y]=Se(m,K.isA);h.useEffect(()=>{(async()=>(g!==i&&await m.set(ve.properties.parent,i,o),y.length===0&&await m.addClasses(o,t.getSubject()),s(!0)))()},[m]);async function v(_){if(l(_),f(void 0),n(_),m.get(K.parent)===i)try{await o.renameSubject(m,_)}catch(x){f(x)}}return{subjectErr:d,subjectValue:u,setSubjectValue:v,resource:m,initialized:a}},qA=({classSubject:e,closeDialog:t,initialProps:n,onSave:r,parent:i})=>{const o=ae(e),[a]=nt(o),s=be(),[u,l]=h.useState(),{subjectErr:d,subjectValue:f,setSubjectValue:m,resource:g}=VA({klass:o,setSubject:l,initialSubject:u,parent:i}),y=h.useCallback(()=>{r(g.getSubject()),t(!0)},[r,t,g]);OA(()=>{(async()=>{const S=lP(n??{}),C=await s.buildUniqueSubjectFromParts([a,S],i);await m(C);for(const[p,w]of Object.entries(n??{}))await g.set(p,w,s)})()});const[v,_,x]=DA(g,y);return i?g.error?c.jsx(yd,{error:g.error}):c.jsxs(c.Fragment,{children:[c.jsx(bi,{children:c.jsx(UA,{classSubject:e,variant:S2.Dialog})}),c.jsxs(Xr,{children:[c.jsx(WA,{error:d,value:f,onChange:m}),c.jsx(Wg,{resource:g,classSubject:e,variant:x2.Dialog,onSave:y},`${e}+${f}`)]}),c.jsxs(Wi,{children:[x&&c.jsx(EK,{children:x.message}),c.jsx(ue,{subtle:!0,onClick:()=>t(!1),children:"Cancel"}),c.jsx(ue,{onClick:v,disabled:_,children:"Save"})]})]}):c.jsx(gt,{children:"No parent set"})};function GA({selected:e,children:t,onMouseOver:n,onClick:r}){const i=h.useRef(null);return h.useEffect(()=>{var o;e&&((o=i.current)==null||o.scrollIntoView({block:"nearest"}))},[e]),c.jsx(Ire,{selected:e,ref:i,tabIndex:-1,onMouseMove:()=>n(),onClick:r,children:t})}function Pre({subject:e,...t}){const n=ae(e),[r]=re(n,F.properties.isA),[i]=re(n,F.properties.description),o=Fo(r??"");return c.jsxs(GA,{...t,children:[c.jsx(o,{}),n.title,i&&c.jsxs(Are,{children:[" - ",i.slice(0,70)]})]})}const Are=A.span.withConfig({displayName:"ResultLine__Description",componentId:"sc-25a67eb1-0"})(["white-space:nowrap;color:",";"],({theme:e})=>e.colors.textLight),Ire=A.li.withConfig({displayName:"ResultLine__ListItem",componentId:"sc-25a67eb1-1"})(["padding:0.5rem;list-style:none;margin:0;padding-left:","rem;border-bottom:1px solid ",";min-width:100%;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:flex;align-items:center;gap:0.7ch;cursor:pointer;"," svg{color:",";min-width:1rem;height:1rem;}"],({theme:e})=>e.margin,({theme:e})=>e.colors.bg2,e=>e.selected&&cn(["box-shadow:inset 0 0 0px 1px ",";color:",";"],({theme:t})=>t.colors.main,({theme:t})=>t.colors.main),({selected:e,theme:t})=>e?t.colors.main:t.colors.textLight),Tre='a[href]:not([disabled]), button:not([disabled]), input:not([disabled], [type=hidden]), [tabindex]:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]), select:not([disabled]), [contenteditable]:not([disabled])';function C2(e,t){const n=t??document.activeElement;if(n){const r=[];document.querySelectorAll(Tre).forEach(o=>{(o.offsetWidth>0||o.offsetHeight>0||o===n)&&r.push(o)});const i=r.indexOf(n);i>-1&&(r[hg(i+e,r.length)]||r[0]).focus()}}function Ore(e){try{return new URL(e),!0}catch{return!1}}function KA(e,t){const[n,r]=h.useState({above:0,below:0,width:0}),i=h.useDeferredValue(e);return h.useLayoutEffect(()=>{if(e){const{top:o,bottom:a,width:s}=t.current.getBoundingClientRect(),{innerHeight:u}=window;r({above:o,below:u-a,width:s})}},[i]),{above:n.above,below:n.below,width:n.width}}function Dre(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}const YA=20;function Nre({searchValue:e,onChange:t,isA:n,scopes:r,placeholder:i,triggerRef:o,onExit:a,onSelect:s,onCreateItem:u}){const{drive:l}=Xe(),[d,f]=h.useState(void 0),{below:m}=KA(!0,o),g=h.useRef(null),y=h.useMemo(()=>({filters:{...n?{[ve.properties.isA]:n}:{}},parents:r??[l,"https://atomicdata.dev"],allowEmptyQuery:!!n}),[n,r]),{results:v,error:_}=qd(e,y),x=m<Dre(YA),S=u?1:0,C=d!==void 0?hg(d,v.length+S):void 0,p=I=>{if(I.key==="Enter"){I.preventDefault(),b();return}if(I.key==="Escape"){a(!1);return}if(I.key==="Tab"&&I.shiftKey){I.preventDefault(),C2(-1,o.current);return}if(I.key==="Tab"){I.preventDefault(),C2(1,o.current);return}if(I.key==="ArrowDown"){I.preventDefault(),f(j=>j===void 0?0:j+1);return}if(I.key==="ArrowUp"){I.preventDefault(),f(j=>(j??0)-1);return}f(void 0)},w=I=>{f(I)},b=()=>{if(C===void 0){s(e);return}if(C===0&&u){u(e);return}s(v[C-S])},k=()=>{requestAnimationFrame(()=>{var I;(I=g.current)!=null&&I.contains(document.activeElement)||a(!0)})},E=I=>{const j=I.clipboardData.getData("text");Ore(j)&&(I.preventDefault(),s(j))};return _?c.jsx(e5,{onBlur:k,ref:g,$above:x,children:c.jsxs(S1,{children:["Error: ",_.message]})}):c.jsxs(e5,{onBlur:k,ref:g,$above:x,children:[c.jsxs(_2,{children:[c.jsx(Qd,{}),c.jsx(k2,{autoFocus:!0,placeholder:i,value:e,onChange:I=>t(I.target.value),onKeyDown:p,onPaste:E})]}),c.jsxs(j2,{"data-testid":"searchbox-results",children:[!e&&v.length===0&&c.jsx(S1,{children:"Start Searching"}),c.jsxs(Mre,{children:[c.jsxs("ul",{children:[u&&e?c.jsxs(GA,{selected:C===0,onMouseOver:()=>w(0),onClick:()=>u(e),children:["Create ",c.jsx($re,{children:e})]}):null,v.map((I,j)=>c.jsx(Pre,{subject:I,selected:j+S===C,onMouseOver:()=>w(j+S),onClick:b},I))]}),!!e&&v.length===0&&c.jsx(S1,{children:"No Results"})]})]})]})}const _2=A.div.withConfig({displayName:"SearchBoxWindow__SearchInputWrapper",componentId:"sc-b948fa18-0"})(["display:flex;flex-direction:row;align-items:center;border:solid 1px ",";height:var(--radix-popover-trigger-height);padding-inline-start:0.5rem;width:100%;& svg{color:",";}&:focus-within{border-color:",";outline:none;}"],e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.main),k2=A.input.withConfig({displayName:"SearchBoxWindow__Input",componentId:"sc-b948fa18-1"})(["background-color:transparent;color:",";padding:0.5rem;height:100%;flex:1;border:none;&:focus-visible{outline:none;}"],e=>e.theme.colors.text),j2=A.div.withConfig({displayName:"SearchBoxWindow__ResultBox",componentId:"sc-b948fa18-2"})(["flex:1;border:solid 1px ",";height:calc(100% - 2rem);overflow:hidden;"],e=>e.theme.colors.bg2),e5=A.div.withConfig({displayName:"SearchBoxWindow__Wrapper",componentId:"sc-b948fa18-3"})(["display:flex;background-color:",";border-radius:",";box-shadow:",";width:100%;height:","rem;position:absolute;width:var(--radix-popover-trigger-width);"," left:0;animation:"," 0.2s ease-in-out;"],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.boxShadowSoft,YA,({$above:e,theme:t})=>e?cn(["bottom:0;flex-direction:column-reverse;",",","{border-bottom-left-radius:",";border-bottom-right-radius:",";}","{border-bottom:none;border-top-left-radius:",";border-top-right-radius:",";}"],_2,k2,t.radius,t.radius,j2,n=>n.theme.radius,n=>n.theme.radius):cn(["top:calc(var(--radix-popover-trigger-height) * -1);flex-direction:column;",",","{border-top-left-radius:",";border-top-right-radius:",";}","{border-top:none;border-bottom-left-radius:",";border-bottom-right-radius:",";}"],_2,k2,t.radius,t.radius,j2,n=>n.theme.radius,n=>n.theme.radius),s3),S1=A.div.withConfig({displayName:"SearchBoxWindow__CenteredMessage",componentId:"sc-b948fa18-4"})(["display:grid;place-items:center;height:100%;width:100%;color:",";"],e=>e.theme.colors.textLight),Mre=A(Hs).withConfig({displayName:"SearchBoxWindow__StyledScrollArea",componentId:"sc-b948fa18-5"})(["overflow:hidden;height:100%;"]),$re=A.span.withConfig({displayName:"SearchBoxWindow__CreateLineInputText",componentId:"sc-b948fa18-6"})(["color:",";font-style:italic;"],e=>e.theme.colors.textLight);function D3({autoFocus:e,value:t,isA:n,scopes:r,placeholder:i,disabled:o,required:a,className:s,children:u,onChange:l,onCreateItem:d,onClose:f}){const m=be(),g=Ua(),y=ae(t),v=h.useRef(null),[_,x]=h.useState(""),S=ae(n),[C,p]=h.useState(!1),w=h.useContext(pg),[b,k]=h.useState(!1),[E,I,j]=Ws(),P=i??`Search for a ${n?S.title:"resource"} or enter a URL...`,B=h.useCallback(H=>{var q;p(!1),j(),H?k(!1):(q=v.current)==null||q.focus(),f==null||f()},[f]),W=h.useCallback(H=>{try{new URL(H),l(H),x("")}catch(q){console.error(q)}B(!1),UE(m)},[_,l,B,m]),D=()=>{if(b){k(!1);return}p(!0),k(!0)};h.useEffect(()=>{if(a&&!t){I("Required");return}if(y.error){I("Invalid Resource",!0);return}I(void 0)},[I,a,t,y]);const L=!t||y.error?"#":mt(y.getSubject()),T=H=>{H.preventDefault(),g(L)},V=y.error?y.getSubject():y.title;return c.jsxs(t3,{open:C,children:[c.jsx(BR,{children:c.jsxs(Fre,{disabled:!!o,className:s,invalid:!!E,children:[c.jsx(Lre,{type:"button",autoFocus:e,disabled:o,ref:v,tabIndex:0,$empty:_.length===0,onFocus:D,onClick:()=>{p(!0),k(!0)},children:t?c.jsx(zre,{children:V}):c.jsxs(c.Fragment,{children:[c.jsx(Qd,{}),c.jsx(Bre,{children:P})]})}),t&&c.jsxs(c.Fragment,{children:[c.jsx(E2,{as:"a",href:L,title:`go to ${V}`,onClick:T,type:"button",children:c.jsx(sg,{})}),c.jsx(E2,{title:"clear",onClick:()=>l(void 0),type:"button",children:c.jsx(lo,{})})]}),u,E&&c.jsx(Hre,{noMovement:!0,children:E})]})}),c.jsx(n3,{container:w.current,children:c.jsx(r3,{align:"start",children:C&&c.jsx(Nre,{searchValue:_,onChange:x,scopes:r,isA:n,placeholder:P,triggerRef:v,onExit:B,onSelect:W,onCreateItem:d})})})]})}const Lre=A.button.withConfig({displayName:"SearchBox__TriggerButton",componentId:"sc-24ce6e70-0"})(["display:flex;align-items:center;padding:0.5rem;border-radius:",";background-color:",";border:none;text-align:start;height:2rem;gap:0.5rem;width:100%;overflow:hidden;cursor:text;color:",";&:disabled{background-color:",";}"],e=>e.theme.radius,e=>e.theme.colors.bg,e=>e.$empty?e.theme.colors.textLight:e.theme.colors.text,e=>e.theme.colors.bg1),Fre=A.div.withConfig({displayName:"SearchBox__TriggerButtonWrapper",componentId:"sc-24ce6e70-1"})(["--search-box-hightlight:",";display:flex;position:relative;border:1px solid ",";border-radius:",";&:hover,&:focus-within{border-color:",";}"],e=>e.invalid?e.theme.colors.alert:e.theme.colors.main,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.disabled?"none":"var(--search-box-hightlight)"),zre=A.span.withConfig({displayName:"SearchBox__ResourceTitle",componentId:"sc-24ce6e70-2"})(["color:var(--search-box-hightlight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),Bre=A.span.withConfig({displayName:"SearchBox__PlaceholderText",componentId:"sc-24ce6e70-3"})(["color:",";"],e=>e.theme.colors.textLight),E2=A.button.withConfig({displayName:"SearchBox__SearchBoxButton",componentId:"sc-24ce6e70-4"})(["background-color:",";border:none;border-left:1px solid ",";display:flex;align-items:center;padding:0.5rem;color:",";cursor:pointer;&:hover,&:focus-visible{color:var(--search-box-hightlight);background-color:",";border-color:var(--search-box-hightlight);}&:last-of-type{border-top-right-radius:",";border-bottom-right-radius:",";}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.radius),Hre=A(Rc).withConfig({displayName:"SearchBox__PositionedErrorChip",componentId:"sc-24ce6e70-5"})(["position:absolute;top:2rem;z-index:10;"]),Ho=h.memo(function({required:t,setSubject:n,value:r,handleRemove:i,error:o,isA:a,disabled:s,parent:u,hideCreateOption:l}){const[d,f,m,g]=Cr(),[y,v]=h.useState(""),{drive:_}=Xe(),{inDialog:x}=o3(),S=h.useMemo(()=>{if(!(l||!a))return C=>{v(C),f()}},[l,n,f,a]);return c.jsxs(Ure,{children:[c.jsx(vu,{value:r,onChange:n,isA:a,required:t,disabled:s,onCreateItem:S,children:i&&c.jsx(E2,{onClick:i,title:"Remove",type:"button",children:c.jsx(Ls,{})})}),o&&c.jsx(Wre,{children:o.message}),!x&&a&&c.jsx(_r,{...d,children:g&&c.jsx(qA,{parent:u||_,classSubject:a,closeDialog:m,initialProps:{[F.properties.shortname]:y},onSave:n})})]})}),vu=A(D3).withConfig({displayName:"ResourceSelector__StyledSearchBox",componentId:"sc-1e7ed9ac-0"})([""]),Ure=A.div.withConfig({displayName:"ResourceSelector__Wrapper",componentId:"sc-1e7ed9ac-1"})(["flex:1;position:relative;--radius:",";","{border-radius:0;}&:first-of-type ","{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);}&:last-of-type ","{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);}&:not(:last-of-type) ","{border-bottom:none;}"],e=>e.theme.radius,vu,vu,vu,vu),Wre=A(Rc).withConfig({displayName:"ResourceSelector__PositionedErrorChip",componentId:"sc-1e7ed9ac-2"})(["position:absolute;top:2rem;z-index:100;"]);function Vre({resource:e,property:t,commit:n,...r}){const[i,o]=h.useState(void 0),[a,s]=oo(e,t.subject,{handleValidationError:o,commit:n});return a===ZE?c.jsx(gt,{children:"Sorry, there is no support for editing nested resources yet"}):c.jsx("div",{children:c.jsx(Ho,{error:i,isA:t.classType,setSubject:s,value:a,parent:e.getSubject(),...r})})}function t5(e,t,n){return h.useMemo(()=>t.map((r,i)=>e(i)),[t,...n])}function N3({resource:e,property:t,commit:n,...r}){const[i,o]=h.useState(void 0),[a,s]=Se(e,t.subject,{validate:!1,commit:n}),[u,l]=h.useState(!1);function d(){s([...a,void 0]),l(!0)}function f(){s([]),l(!1)}const m=t5(v=>()=>{const _=[...a];_.splice(v,1),s(_)},a,[s]),g=t5(v=>_=>{if(_){const x=[...a];x[v]=_;try{za(x,t.datatype),s(x),l(!1),o(void 0)}catch(S){o(S)}}},a,[t.datatype,s]),y=h.useCallback(v=>{if(i&&i.index===v)return i},[i]);return c.jsxs(Ne,{children:[a.length>0&&c.jsx("div",{children:a.map((v,_)=>c.jsx(Ho,{value:v,setSubject:g[_],error:y(_),isA:t.classType,handleRemove:m[_],parent:e.getSubject(),...r,autoFocus:u&&_===a.length-1},`${t.subject}${_}`))}),c.jsxs(Le,{justify:"space-between",children:[c.jsx(n5,{disabled:r.disabled,title:`Add an item to the ${t.shortname} list`,"data-test":`input-${t.shortname}-add-resource`,subtle:!0,type:"button",onClick:d,children:c.jsx(qn,{})}),a.length>1&&c.jsx(n5,{disabled:r.disabled,title:"Remove all items from this list","data-test":`input-${t.shortname}-clear`,subtle:!0,type:"button",onClick:f,children:c.jsxs(Le,{gap:".5rem",children:[c.jsx(Ls,{})," Clear"]})})]}),!!i&&c.jsx(gn,{children:i==null?void 0:i.message})]})}const n5=A(ue).withConfig({displayName:"InputResourceArray__StyledButton",componentId:"sc-dfc62bb5-0"})(["align-self:flex-start;"]);var XA={};function Vg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var QA={exports:{}},ut={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xn=typeof Symbol=="function"&&Symbol.for,M3=xn?Symbol.for("react.element"):60103,$3=xn?Symbol.for("react.portal"):60106,qg=xn?Symbol.for("react.fragment"):60107,Gg=xn?Symbol.for("react.strict_mode"):60108,Kg=xn?Symbol.for("react.profiler"):60114,Yg=xn?Symbol.for("react.provider"):60109,Xg=xn?Symbol.for("react.context"):60110,L3=xn?Symbol.for("react.async_mode"):60111,Qg=xn?Symbol.for("react.concurrent_mode"):60111,Jg=xn?Symbol.for("react.forward_ref"):60112,Zg=xn?Symbol.for("react.suspense"):60113,qre=xn?Symbol.for("react.suspense_list"):60120,e0=xn?Symbol.for("react.memo"):60115,t0=xn?Symbol.for("react.lazy"):60116,Gre=xn?Symbol.for("react.block"):60121,Kre=xn?Symbol.for("react.fundamental"):60117,Yre=xn?Symbol.for("react.responder"):60118,Xre=xn?Symbol.for("react.scope"):60119;function Qr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case M3:switch(e=e.type,e){case L3:case Qg:case qg:case Kg:case Gg:case Zg:return e;default:switch(e=e&&e.$$typeof,e){case Xg:case Jg:case t0:case e0:case Yg:return e;default:return t}}case $3:return t}}}function JA(e){return Qr(e)===Qg}ut.AsyncMode=L3;ut.ConcurrentMode=Qg;ut.ContextConsumer=Xg;ut.ContextProvider=Yg;ut.Element=M3;ut.ForwardRef=Jg;ut.Fragment=qg;ut.Lazy=t0;ut.Memo=e0;ut.Portal=$3;ut.Profiler=Kg;ut.StrictMode=Gg;ut.Suspense=Zg;ut.isAsyncMode=function(e){return JA(e)||Qr(e)===L3};ut.isConcurrentMode=JA;ut.isContextConsumer=function(e){return Qr(e)===Xg};ut.isContextProvider=function(e){return Qr(e)===Yg};ut.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===M3};ut.isForwardRef=function(e){return Qr(e)===Jg};ut.isFragment=function(e){return Qr(e)===qg};ut.isLazy=function(e){return Qr(e)===t0};ut.isMemo=function(e){return Qr(e)===e0};ut.isPortal=function(e){return Qr(e)===$3};ut.isProfiler=function(e){return Qr(e)===Kg};ut.isStrictMode=function(e){return Qr(e)===Gg};ut.isSuspense=function(e){return Qr(e)===Zg};ut.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qg||e===Qg||e===Kg||e===Gg||e===Zg||e===qre||typeof e=="object"&&e!==null&&(e.$$typeof===t0||e.$$typeof===e0||e.$$typeof===Yg||e.$$typeof===Xg||e.$$typeof===Jg||e.$$typeof===Kre||e.$$typeof===Yre||e.$$typeof===Xre||e.$$typeof===Gre)};ut.typeOf=Qr;QA.exports=ut;var Qre=QA.exports,F3=Qre,Jre={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Zre={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eie={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ZA={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z3={};z3[F3.ForwardRef]=eie;z3[F3.Memo]=ZA;function r5(e){return F3.isMemo(e)?ZA:z3[e.$$typeof]||Jre}var tie=Object.defineProperty,nie=Object.getOwnPropertyNames,i5=Object.getOwnPropertySymbols,rie=Object.getOwnPropertyDescriptor,iie=Object.getPrototypeOf,o5=Object.prototype;function eI(e,t,n){if(typeof t!="string"){if(o5){var r=iie(t);r&&r!==o5&&eI(e,r,n)}var i=nie(t);i5&&(i=i.concat(i5(t)));for(var o=r5(e),a=r5(t),s=0;s<i.length;++s){var u=i[s];if(!Zre[u]&&!(n&&n[u])&&!(a&&a[u])&&!(o&&o[u])){var l=rie(t,u);try{tie(e,u,l)}catch{}}}}return e}var oie=eI;const tI=nr(oie);var aie=!0;function a5(e,t){if(!aie){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var nI={};Object.defineProperty(nI,"__esModule",{value:!0});nI.default=sie;function sie(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}function ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hm(){return hm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hm.apply(this,arguments)}function lie(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Xo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cie(e){var t=function(n){lie(r,n);function r(){for(var o,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return o=n.call.apply(n,[this].concat(s))||this,ip(Xo(Xo(o)),"cachedTheme",void 0),ip(Xo(Xo(o)),"lastOuterTheme",void 0),ip(Xo(Xo(o)),"lastTheme",void 0),ip(Xo(Xo(o)),"renderProvider",function(l){var d=o.props.children;return le.createElement(e.Provider,{value:o.getTheme(l)},d)}),o}var i=r.prototype;return i.getTheme=function(a){if(this.props.theme!==this.lastTheme||a!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=a,this.lastTheme=this.props.theme,typeof this.lastTheme=="function"){var s=this.props.theme;this.cachedTheme=s(a)}else{var u=this.props.theme;this.cachedTheme=a?hm({},a,u):u}return this.cachedTheme},i.render=function(){var a=this.props.children;return a?le.createElement(e.Consumer,null,this.renderProvider):null},r}(le.Component);return t}function uie(e){return function(n){var r=le.forwardRef(function(i,o){return le.createElement(e.Consumer,null,function(a){return le.createElement(n,hm({theme:a,ref:o},i))})});return tI(r,n),r}}function die(e){var t=function(){var r=le.useContext(e);return r};return t}function rI(e){return{context:e,withTheme:uie(e),useTheme:die(e),ThemeProvider:cie(e)}}var n0=h.createContext(),B3=rI(n0),fie=B3.withTheme,pie=B3.ThemeProvider,hie=B3.useTheme,s5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pc=(typeof window>"u"?"undefined":s5(window))==="object"&&(typeof document>"u"?"undefined":s5(document))==="object"&&document.nodeType===9;function jd(e){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jd(e)}function mie(e,t){if(jd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gie(e){var t=mie(e,"string");return jd(t)==="symbol"?t:String(t)}function l5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gie(r.key),r)}}function H3(e,t,n){return t&&l5(e.prototype,t),n&&l5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var vie={}.constructor;function R2(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(R2);if(e.constructor!==vie)return e;var t={};for(var n in e)t[n]=R2(e[n]);return t}function r0(e,t,n){e===void 0&&(e="unnamed");var r=n.jss,i=R2(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var c5=function(t,n){for(var r="",i=0;i<t.length&&t[i]!=="!important";i++)r&&(r+=n),r+=t[i];return r},vs=function(t){if(!Array.isArray(t))return t;var n="";if(Array.isArray(t[0]))for(var r=0;r<t.length&&t[r]!=="!important";r++)n&&(n+=", "),n+=c5(t[r]," ");else n=c5(t,", ");return t[t.length-1]==="!important"&&(n+=" !important"),n};function Ac(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
`,space:" "}}function ru(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Ed(e,t,n){n===void 0&&(n={});var r="";if(!t)return r;var i=n,o=i.indent,a=o===void 0?0:o,s=t.fallbacks;n.format===!1&&(a=-1/0);var u=Ac(n),l=u.linebreak,d=u.space;if(e&&a++,s)if(Array.isArray(s))for(var f=0;f<s.length;f++){var m=s[f];for(var g in m){var y=m[g];y!=null&&(r&&(r+=l),r+=ru(g+":"+d+vs(y)+";",a))}}else for(var v in s){var _=s[v];_!=null&&(r&&(r+=l),r+=ru(v+":"+d+vs(_)+";",a))}for(var x in t){var S=t[x];S!=null&&x!=="fallbacks"&&(r&&(r+=l),r+=ru(x+":"+d+vs(S)+";",a))}return!r&&!n.allowEmpty||!e?r:(a--,r&&(r=""+l+r+l),ru(""+e+d+"{"+r,a)+ru("}",a))}var yie=/([[\].#*$><+~=|^:(),"'`\s])/g,u5=typeof CSS<"u"&&CSS.escape,U3=function(e){return u5?u5(e):e.replace(yie,"\\$1")},iI=function(){function e(n,r,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=r,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,i,o){if(i===void 0)return this.style[r];var a=o?o.force:!1;if(!a&&this.style[r]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,r,this));var u=s==null||s===!1,l=r in this.style;if(u&&!l&&!a)return this;var d=u&&l;if(d?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var f=this.options.sheet;return f&&f.attached,this},e}(),P2=function(e){ng(t,e);function t(r,i,o){var a;a=e.call(this,r,i,o)||this;var s=o.selector,u=o.scoped,l=o.sheet,d=o.generateId;return s?a.selectorText=s:u!==!1&&(a.id=d(hd(hd(a)),l),a.selectorText="."+U3(a.id)),a}var n=t.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=vs(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?pe({},i,{allowEmpty:!0}):i;return Ed(this.selectorText,this.style,s)},H3(t,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(iI),bie={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new P2(t,n,r)}},C1={indent:1,children:!0},wie=/@([\w-]+)/,xie=function(){function e(n,r,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(wie);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new i0(pe({},i,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,i,o){var a=this.rules.add(r,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,i,o){var a=this.rules.replace(r,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=C1);var i=Ac(r),o=i.linebreak;if(r.indent==null&&(r.indent=C1.indent),r.children==null&&(r.children=C1.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+o+a+o+"}":""},e}(),Sie=/@container|@media|@supports\s+/,Cie={onCreateRule:function(t,n,r){return Sie.test(t)?new xie(t,n,r):null}},_1={indent:1,children:!0},_ie=/@keyframes\s+([\w-]+)/,A2=function(){function e(n,r,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(_ie);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,u=i.generateId;this.id=a===!1?this.name:U3(u(this,s)),this.rules=new i0(pe({},i,{parent:this}));for(var l in r)this.rules.add(l,r[l],pe({},i,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=_1);var i=Ac(r),o=i.linebreak;if(r.indent==null&&(r.indent=_1.indent),r.children==null&&(r.children=_1.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},e}(),kie=/@keyframes\s+/,jie=/\$([\w-]+)/g,I2=function(t,n){return typeof t=="string"?t.replace(jie,function(r,i){return i in n?n[i]:r}):t},d5=function(t,n,r){var i=t[n],o=I2(i,r);o!==i&&(t[n]=o)},Eie={onCreateRule:function(t,n,r){return typeof t=="string"&&kie.test(t)?new A2(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&d5(t,"animation-name",r.keyframes),"animation"in t&&d5(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var i=r.options.sheet;if(!i)return t;switch(n){case"animation":return I2(t,i.keyframes);case"animation-name":return I2(t,i.keyframes);default:return t}}},Rie=function(e){ng(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?pe({},i,{allowEmpty:!0}):i;return Ed(this.key,this.style,s)},t}(iI),Pie={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new Rie(t,n,r):null}},Aie=function(){function e(n,r,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var t=e.prototype;return t.toString=function(r){var i=Ac(r),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=Ed(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return Ed(this.at,this.style,r)},e}(),Iie=/@font-face/,Tie={onCreateRule:function(t,n,r){return Iie.test(t)?new Aie(t,n,r):null}},Oie=function(){function e(n,r,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var t=e.prototype;return t.toString=function(r){return Ed(this.key,this.style,r)},e}(),Die={onCreateRule:function(t,n,r){return t==="@viewport"||t==="@-ms-viewport"?new Oie(t,n,r):null}},Nie=function(){function e(n,r,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=r,this.options=i}var t=e.prototype;return t.toString=function(r){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
`);return i}return this.key+" "+this.value+";"},e}(),Mie={"@charset":!0,"@import":!0,"@namespace":!0},$ie={onCreateRule:function(t,n,r){return t in Mie?new Nie(t,n,r):null}},f5=[bie,Cie,Eie,Pie,Tie,Die,$ie],Lie={process:!0},p5={force:!0,process:!0},i0=function(){function e(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var t=e.prototype;return t.add=function(r,i,o){var a=this.options,s=a.parent,u=a.sheet,l=a.jss,d=a.Renderer,f=a.generateId,m=a.scoped,g=pe({classes:this.classes,parent:s,sheet:u,jss:l,Renderer:d,generateId:f,scoped:m,name:r,keyframes:this.keyframes,selector:void 0},o),y=r;r in this.raw&&(y=r+"-d"+this.counter++),this.raw[y]=i,y in this.classes&&(g.selector="."+U3(this.classes[y]));var v=r0(y,i,g);if(!v)return null;this.register(v);var _=g.index===void 0?this.index.length:g.index;return this.index.splice(_,0,v),v},t.replace=function(r,i,o){var a=this.get(r),s=this.index.indexOf(a);a&&this.remove(a);var u=o;return s!==-1&&(u=pe({},o,{index:s})),this.add(r,i,u)},t.get=function(r){return this.map[r]},t.remove=function(r){this.unregister(r),delete this.raw[r.key],this.index.splice(this.index.indexOf(r),1)},t.indexOf=function(r){return this.index.indexOf(r)},t.process=function(){var r=this.options.jss.plugins;this.index.slice(0).forEach(r.onProcessRule,r)},t.register=function(r){this.map[r.key]=r,r instanceof P2?(this.map[r.selector]=r,r.id&&(this.classes[r.key]=r.id)):r instanceof A2&&this.keyframes&&(this.keyframes[r.name]=r.id)},t.unregister=function(r){delete this.map[r.key],r instanceof P2?(delete this.map[r.selector],delete this.classes[r.key]):r instanceof A2&&delete this.keyframes[r.name]},t.update=function(){var r,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(r=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],r=null),r)this.updateOne(this.get(r),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},t.updateOne=function(r,i,o){o===void 0&&(o=Lie);var a=this.options,s=a.jss.plugins,u=a.sheet;if(r.rules instanceof e){r.rules.update(i,o);return}var l=r.style;if(s.onUpdate(i,r,u,o),o.process&&l&&l!==r.style){s.onProcessStyle(r.style,r,u);for(var d in r.style){var f=r.style[d],m=l[d];f!==m&&r.prop(d,f,p5)}for(var g in l){var y=r.style[g],v=l[g];y==null&&y!==v&&r.prop(g,null,p5)}}},t.toString=function(r){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=Ac(r),u=s.linebreak,l=0;l<this.index.length;l++){var d=this.index[l],f=d.toString(r);!f&&!a||(i&&(i+=u),i+=f)}return i},e}(),oI=function(){function e(n,r){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=pe({},r,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),r.Renderer&&(this.renderer=new r.Renderer(this)),this.rules=new i0(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(r,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(r,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},t.replaceRule=function(r,i,o){var a=this.rules.get(r);if(!a)return this.addRule(r,i,o);var s=this.rules.replace(r,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},t.insertRule=function(r){this.renderer&&this.renderer.insertRule(r)},t.addRules=function(r,i){var o=[];for(var a in r){var s=this.addRule(a,r[a],i);s&&o.push(s)}return o},t.getRule=function(r){return this.rules.get(r)},t.deleteRule=function(r){var i=typeof r=="object"?r:this.rules.get(r);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},t.indexOf=function(r){return this.rules.indexOf(r)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var r;return(r=this.rules).update.apply(r,arguments),this},t.updateOne=function(r,i,o){return this.rules.updateOne(r,i,o),this},t.toString=function(r){return this.rules.toString(r)},e}(),Fie=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(r,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](r,i,o);if(s)return s}return null},t.onProcessRule=function(r){if(!r.isProcessed){for(var i=r.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](r,i);r.style&&this.onProcessStyle(r.style,r,i),r.isProcessed=!0}},t.onProcessStyle=function(r,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},t.onProcessSheet=function(r){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](r)},t.onUpdate=function(r,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](r,i,o,a)},t.onChangeValue=function(r,i,o){for(var a=r,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},t.use=function(r,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(r)===-1&&(o.push(r),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var u in s)u in a&&a[u].push(s[u]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),aI=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(r){var i=this.registry,o=r.options.index;if(i.indexOf(r)===-1){if(i.length===0||o>=this.index){i.push(r);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var i=this.registry.indexOf(r);this.registry.splice(i,1)},t.toString=function(r){for(var i=r===void 0?{}:r,o=i.attached,a=Vg(i,["attached"]),s=Ac(a),u=s.linebreak,l="",d=0;d<this.registry.length;d++){var f=this.registry[d];o!=null&&f.attached!==o||(l&&(l+=u),l+=f.toString(a))}return l},H3(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e}(),Mu=new aI,T2=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),O2="2f1acc6c3a606b082e5eef5e54414ffb";T2[O2]==null&&(T2[O2]=0);var h5=T2[O2]++,mm=function(t){t===void 0&&(t={});var n=0,r=function(o,a){n+=1;var s="",u="";return a&&(a.options.classNamePrefix&&(u=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),t.minify?""+(u||"c")+h5+s+n:u+o.key+"-"+h5+(s?"-"+s:"")+"-"+n};return r},sI=function(t){var n;return function(){return n||(n=t()),n}},zie=function(t,n){try{return t.attributeStyleMap?t.attributeStyleMap.get(n):t.style.getPropertyValue(n)}catch{return""}},Bie=function(t,n,r){try{var i=r;if(Array.isArray(r)&&(i=vs(r)),t.attributeStyleMap)t.attributeStyleMap.set(n,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;t.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},Hie=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},Uie=function(t,n){return t.selectorText=n,t.selectorText===n},lI=sI(function(){return document.querySelector("head")});function Wie(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Vie(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function qie(e){for(var t=lI(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(r.nodeType===8&&r.nodeValue.trim()===e)return r}return null}function Gie(e){var t=Mu.registry;if(t.length>0){var n=Wie(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Vie(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var i=qie(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Kie(e,t){var n=t.insertionPoint,r=Gie(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling);return}lI().appendChild(e)}var Yie=sI(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),m5=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},g5=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},Xie=function(){var t=document.createElement("style");return t.textContent=`
`,t},Qie=function(){function e(n){this.getPropertyValue=zie,this.setProperty=Bie,this.removeProperty=Hie,this.setSelector=Uie,this.hasInsertedRules=!1,this.cssRules=[],n&&Mu.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},i=r.media,o=r.meta,a=r.element;this.element=a||Xie(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Yie();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){Kie(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
`)}},t.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=`
`+r.toString()+`
`}},t.insertRules=function(r,i){for(var o=0;o<r.index.length;o++)this.insertRule(r.index[o],o,i)},t.insertRule=function(r,i,o){if(o===void 0&&(o=this.element.sheet),r.rules){var a=r,s=o;if(r.type==="conditional"||r.type==="keyframes"){var u=g5(o,i);if(s=m5(o,a.toString({children:!1}),u),s===!1)return!1;this.refCssRule(r,u,s)}return this.insertRules(a.rules,s),s}var l=r.toString();if(!l)return!1;var d=g5(o,i),f=m5(o,l,d);return f===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(r,d,f),f)},t.refCssRule=function(r,i,o){r.renderable=o,r.options.parent instanceof oI&&this.cssRules.splice(i,0,o)},t.deleteRule=function(r){var i=this.element.sheet,o=this.indexOf(r);return o===-1?!1:(i.deleteRule(o),this.cssRules.splice(o,1),!0)},t.indexOf=function(r){return this.cssRules.indexOf(r)},t.replaceRule=function(r,i){var o=this.indexOf(r);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(i,o))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Jie=0,Zie=function(){function e(n){this.id=Jie++,this.version="10.10.0",this.plugins=new Fie,this.options={id:{minify:!1},createGenerateId:mm,Renderer:Pc?Qie:null,plugins:[]},this.generateId=mm({minify:!1});for(var r=0;r<f5.length;r++)this.plugins.use(f5[r],{queue:"internal"});this.setup(n)}var t=e.prototype;return t.setup=function(r){return r===void 0&&(r={}),r.createGenerateId&&(this.options.createGenerateId=r.createGenerateId),r.id&&(this.options.id=pe({},this.options.id,r.id)),(r.createGenerateId||r.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),r.insertionPoint!=null&&(this.options.insertionPoint=r.insertionPoint),"Renderer"in r&&(this.options.Renderer=r.Renderer),r.plugins&&this.use.apply(this,r.plugins),this},t.createStyleSheet=function(r,i){i===void 0&&(i={});var o=i,a=o.index;typeof a!="number"&&(a=Mu.index===0?0:Mu.index+1);var s=new oI(r,pe({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(s),s},t.removeStyleSheet=function(r){return r.detach(),Mu.remove(r),this},t.createRule=function(r,i,o){if(i===void 0&&(i={}),o===void 0&&(o={}),typeof r=="object")return this.createRule(void 0,r,i);var a=pe({},o,{name:r,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var s=r0(r,i,a);return s&&this.plugins.onProcessRule(s),s},t.use=function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.forEach(function(s){r.plugins.use(s)}),this},e}(),W3=function(t){return new Zie(t)},v5=function(){function e(){this.length=0,this.sheets=new WeakMap}var t=e.prototype;return t.get=function(r){var i=this.sheets.get(r);return i&&i.sheet},t.add=function(r,i){this.sheets.has(r)||(this.length++,this.sheets.set(r,{sheet:i,refs:0}))},t.manage=function(r){var i=this.sheets.get(r);if(i)return i.refs===0&&i.sheet.attach(),i.refs++,i.sheet;a5(!1,"[JSS] SheetsManager: can't find sheet to manage")},t.unmanage=function(r){var i=this.sheets.get(r);i?i.refs>0&&(i.refs--,i.refs===0&&i.sheet.detach()):a5(!1,"SheetsManager: can't find sheet to unmanage")},H3(e,[{key:"size",get:function(){return this.length}}]),e}(),V3=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function cI(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if(i==="function")t||(t={}),t[n]=r;else if(i==="object"&&r!==null&&!Array.isArray(r)){var o=cI(r);o&&(t||(t={}),t[n]=o)}}return t}/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/W3();var uI=Date.now(),k1="fnValues"+uI,j1="fnStyle"+ ++uI,eoe=function(){return{onCreateRule:function(n,r,i){if(typeof r!="function")return null;var o=r0(n,{},i);return o[j1]=r,o},onProcessStyle:function(n,r){if(k1 in r||j1 in r)return n;var i={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],i[o]=a)}return r[k1]=i,n},onUpdate:function(n,r,i,o){var a=r,s=a[j1];s&&(a.style=s(n)||{});var u=a[k1];if(u)for(var l in u)a.prop(l,u[l](n),o)}}};const toe=eoe;function noe(e){var t,n=e.Symbol;return typeof n=="function"?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}var gl;typeof self<"u"?gl=self:typeof window<"u"?gl=window:typeof global<"u"?gl=global:typeof module<"u"?gl=module:gl=Function("return this")();var y5=noe(gl),b5=function(t){return t&&t[y5]&&t===t[y5]()},roe=function(t){return{onCreateRule:function(r,i,o){if(!b5(i))return null;var a=i,s=r0(r,{},o);return a.subscribe(function(u){for(var l in u)s.prop(l,u[l],t)}),s},onProcessRule:function(r){if(!(r&&r.type!=="style")){var i=r,o=i.style,a=function(d){var f=o[d];if(!b5(f))return"continue";delete o[d],f.subscribe({next:function(g){i.prop(d,g,t)}})};for(var s in o)var u=a(s)}}}};const ioe=roe;var ooe=/;\n/,aoe=function(t){for(var n={},r=t.split(ooe),i=0;i<r.length;i++){var o=(r[i]||"").trim();if(o){var a=o.indexOf(":");if(a!==-1){var s=o.substr(0,a).trim(),u=o.substr(a+1).trim();n[s]=u}}}return n},soe=function(t){typeof t.style=="string"&&(t.style=aoe(t.style))};function loe(){return{onProcessRule:soe}}var _a="@global",D2="@global ",coe=function(){function e(n,r,i){this.type="global",this.at=_a,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new i0(pe({},i,{parent:this}));for(var o in r)this.rules.add(o,r[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,i,o){var a=this.rules.add(r,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},t.replaceRule=function(r,i,o){var a=this.rules.replace(r,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(r){return this.rules.toString(r)},e}(),uoe=function(){function e(n,r,i){this.type="global",this.at=_a,this.isProcessed=!1,this.key=n,this.options=i;var o=n.substr(D2.length);this.rule=i.jss.createRule(o,r,pe({},i,{parent:this}))}var t=e.prototype;return t.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),doe=/\s*,\s*/g;function dI(e,t){for(var n=e.split(doe),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function foe(e,t){var n=e.options,r=e.style,i=r?r[_a]:null;if(i){for(var o in i)t.addRule(o,i[o],pe({},n,{selector:dI(o,e.selector)}));delete r[_a]}}function poe(e,t){var n=e.options,r=e.style;for(var i in r)if(!(i[0]!=="@"||i.substr(0,_a.length)!==_a)){var o=dI(i.substr(_a.length),e.selector);t.addRule(o,r[i],pe({},n,{selector:o})),delete r[i]}}function hoe(){function e(n,r,i){if(!n)return null;if(n===_a)return new coe(n,r,i);if(n[0]==="@"&&n.substr(0,D2.length)===D2)return new uoe(n,r,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function t(n,r){n.type!=="style"||!r||(foe(n,r),poe(n,r))}return{onCreateRule:e,onProcessRule:t}}var rh=function(t){return t&&typeof t=="object"&&!Array.isArray(t)},E1="extendCurrValue"+Date.now();function moe(e,t,n,r){var i=typeof e.extend;if(i==="string"){if(!n)return;var o=n.getRule(e.extend);if(!o||o===t)return;var a=o.options.parent;if(a){var s=a.rules.raw[e.extend];ds(s,t,n,r)}return}if(Array.isArray(e.extend)){for(var u=0;u<e.extend.length;u++){var l=e.extend[u],d=typeof l=="string"?pe({},e,{extend:l}):e.extend[u];ds(d,t,n,r)}return}for(var f in e.extend){if(f==="extend"){ds(e.extend.extend,t,n,r);continue}if(rh(e.extend[f])){f in r||(r[f]={}),ds(e.extend[f],t,n,r[f]);continue}r[f]=e.extend[f]}}function goe(e,t,n,r){for(var i in e)if(i!=="extend"){if(rh(r[i])&&rh(e[i])){ds(e[i],t,n,r[i]);continue}if(rh(e[i])){r[i]=ds(e[i],t,n);continue}r[i]=e[i]}}function ds(e,t,n,r){return r===void 0&&(r={}),moe(e,t,n,r),goe(e,t,n,r),r}function voe(){function e(n,r,i){return"extend"in n?ds(n,r,i):n}function t(n,r,i){if(r!=="extend")return n;if(n==null||n===!1){for(var o in i[E1])i.prop(o,null);return i[E1]=null,null}if(typeof n=="object"){for(var a in n)i.prop(a,n[a]);i[E1]=n}return null}return{onProcessStyle:e,onChangeValue:t}}var w5=/\s*,\s*/g,yoe=/&/g,boe=/\$([\w-]+)/g;function woe(){function e(i,o){return function(a,s){var u=i.getRule(s)||o&&o.getRule(s);return u?u.selector:s}}function t(i,o){for(var a=o.split(w5),s=i.split(w5),u="",l=0;l<a.length;l++)for(var d=a[l],f=0;f<s.length;f++){var m=s[f];u&&(u+=", "),u+=m.indexOf("&")!==-1?m.replace(yoe,d):d+" "+m}return u}function n(i,o,a){if(a)return pe({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var u=pe({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete u.name,u}function r(i,o,a){if(o.type!=="style")return i;var s=o,u=s.options.parent,l,d;for(var f in i){var m=f.indexOf("&")!==-1,g=f[0]==="@";if(!(!m&&!g)){if(l=n(s,u,l),m){var y=t(f,s.selector);d||(d=e(u,a)),y=y.replace(boe,d);var v=s.key+"-"+f;"replaceRule"in u?u.replaceRule(v,i[f],pe({},l,{selector:y})):u.addRule(v,i[f],pe({},l,{selector:y}))}else g&&u.addRule(f,{},l).addRule(s.key,i[f],{selector:s.selector});delete i[f]}}return i}return{onProcessStyle:r}}function N2(e,t){if(!t)return!0;if(Array.isArray(t)){for(var n=0;n<t.length;n++){var r=N2(e,t[n]);if(!r)return!1}return!0}if(t.indexOf(" ")>-1)return N2(e,t.split(" "));var i=e.options.parent;if(t[0]==="$"){var o=i.getRule(t.substr(1));return!o||o===e?!1:(i.classes[e.key]+=" "+i.classes[o.key],!0)}return i.classes[e.key]+=" "+t,!0}function xoe(){function e(t,n){return"composes"in t&&(N2(n,t.composes),delete t.composes),t}return{onProcessStyle:e}}var Soe=/[A-Z]/g,Coe=/^ms-/,R1={};function _oe(e){return"-"+e.toLowerCase()}function fI(e){if(R1.hasOwnProperty(e))return R1[e];var t=e.replace(Soe,_oe);return R1[e]=Coe.test(t)?"-"+t:t}function gm(e){var t={};for(var n in e){var r=n.indexOf("--")===0?n:fI(n);t[r]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(gm):t.fallbacks=gm(e.fallbacks)),t}function koe(){function e(n){if(Array.isArray(n)){for(var r=0;r<n.length;r++)n[r]=gm(n[r]);return n}return gm(n)}function t(n,r,i){if(r.indexOf("--")===0)return n;var o=fI(r);return r===o?n:(i.prop(o,n),null)}return{onProcessStyle:e,onChangeValue:t}}var Q=V3&&CSS?CSS.px:"px",op=V3&&CSS?CSS.ms:"ms",fl=V3&&CSS?CSS.percent:"%",joe={"animation-delay":op,"animation-duration":op,"background-position":Q,"background-position-x":Q,"background-position-y":Q,"background-size":Q,border:Q,"border-bottom":Q,"border-bottom-left-radius":Q,"border-bottom-right-radius":Q,"border-bottom-width":Q,"border-left":Q,"border-left-width":Q,"border-radius":Q,"border-right":Q,"border-right-width":Q,"border-top":Q,"border-top-left-radius":Q,"border-top-right-radius":Q,"border-top-width":Q,"border-width":Q,"border-block":Q,"border-block-end":Q,"border-block-end-width":Q,"border-block-start":Q,"border-block-start-width":Q,"border-block-width":Q,"border-inline":Q,"border-inline-end":Q,"border-inline-end-width":Q,"border-inline-start":Q,"border-inline-start-width":Q,"border-inline-width":Q,"border-start-start-radius":Q,"border-start-end-radius":Q,"border-end-start-radius":Q,"border-end-end-radius":Q,margin:Q,"margin-bottom":Q,"margin-left":Q,"margin-right":Q,"margin-top":Q,"margin-block":Q,"margin-block-end":Q,"margin-block-start":Q,"margin-inline":Q,"margin-inline-end":Q,"margin-inline-start":Q,padding:Q,"padding-bottom":Q,"padding-left":Q,"padding-right":Q,"padding-top":Q,"padding-block":Q,"padding-block-end":Q,"padding-block-start":Q,"padding-inline":Q,"padding-inline-end":Q,"padding-inline-start":Q,"mask-position-x":Q,"mask-position-y":Q,"mask-size":Q,height:Q,width:Q,"min-height":Q,"max-height":Q,"min-width":Q,"max-width":Q,bottom:Q,left:Q,top:Q,right:Q,inset:Q,"inset-block":Q,"inset-block-end":Q,"inset-block-start":Q,"inset-inline":Q,"inset-inline-end":Q,"inset-inline-start":Q,"box-shadow":Q,"text-shadow":Q,"column-gap":Q,"column-rule":Q,"column-rule-width":Q,"column-width":Q,"font-size":Q,"font-size-delta":Q,"letter-spacing":Q,"text-decoration-thickness":Q,"text-indent":Q,"text-stroke":Q,"text-stroke-width":Q,"word-spacing":Q,motion:Q,"motion-offset":Q,outline:Q,"outline-offset":Q,"outline-width":Q,perspective:Q,"perspective-origin-x":fl,"perspective-origin-y":fl,"transform-origin":fl,"transform-origin-x":fl,"transform-origin-y":fl,"transform-origin-z":fl,"transition-delay":op,"transition-duration":op,"vertical-align":Q,"flex-basis":Q,"shape-margin":Q,size:Q,gap:Q,grid:Q,"grid-gap":Q,"row-gap":Q,"grid-row-gap":Q,"grid-column-gap":Q,"grid-template-rows":Q,"grid-template-columns":Q,"grid-auto-rows":Q,"grid-auto-columns":Q,"box-shadow-x":Q,"box-shadow-y":Q,"box-shadow-blur":Q,"box-shadow-spread":Q,"font-line-height":Q,"text-shadow-x":Q,"text-shadow-y":Q,"text-shadow-blur":Q};function pI(e){var t=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Eoe=pI(joe);function $u(e,t,n){if(t==null)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=$u(e,t[r],n);else if(typeof t=="object")if(e==="fallbacks")for(var i in t)t[i]=$u(i,t[i],n);else for(var o in t)t[o]=$u(e+"-"+o,t[o],n);else if(typeof t=="number"&&isNaN(t)===!1){var a=n[e]||Eoe[e];return a&&!(t===0&&a===Q)?typeof a=="function"?a(t).toString():""+t+a:t.toString()}return t}function Roe(e){e===void 0&&(e={});var t=pI(e);function n(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=$u(a,i[a],t);return i}function r(i,o){return $u(o,i,t)}return{onProcessStyle:n,onChangeValue:r}}var Poe={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},Aoe={position:!0,size:!0},ap={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},P1={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function Ioe(e,t,n){return e.map(function(r){return mI(r,t,n,!1,!0)})}function hI(e,t,n,r){return n[t]==null?e:e.length===0?[]:Array.isArray(e[0])?hI(e[0],t,n,r):typeof e[0]=="object"?Ioe(e,t,r):[e]}function mI(e,t,n,r,i){if(!(ap[t]||P1[t]))return[];var o=[];if(P1[t]&&(e=Toe(e,n,P1[t],r)),Object.keys(e).length)for(var a in ap[t]){if(e[a]){Array.isArray(e[a])?o.push(Aoe[a]===null?e[a]:e[a].join(" ")):o.push(e[a]);continue}ap[t][a]!=null&&o.push(ap[t][a])}return!o.length||i?o:[o]}function Toe(e,t,n,r){for(var i in n){var o=n[i];if(typeof e[i]<"u"&&(r||!t.prop(o))){var a,s=Rd((a={},a[o]=e[i],a),t)[o];r?t.style.fallbacks[o]=s:t.style[o]=s}delete e[i]}return e}function Rd(e,t,n){for(var r in e){var i=e[r];if(Array.isArray(i)){if(!Array.isArray(i[0])){if(r==="fallbacks"){for(var o=0;o<e.fallbacks.length;o++)e.fallbacks[o]=Rd(e.fallbacks[o],t,!0);continue}e[r]=hI(i,r,Poe,t),e[r].length||delete e[r]}}else if(typeof i=="object"){if(r==="fallbacks"){e.fallbacks=Rd(e.fallbacks,t,!0);continue}e[r]=mI(i,r,t,n),e[r].length||delete e[r]}else e[r]===""&&delete e[r]}return e}function Ooe(){function e(t,n){if(!t||n.type!=="style")return t;if(Array.isArray(t)){for(var r=0;r<t.length;r++)t[r]=Rd(t[r],n);return t}return Rd(t,n)}return{onProcessStyle:e}}function M2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Doe(e){if(Array.isArray(e))return M2(e)}function Noe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Moe(e,t){if(e){if(typeof e=="string")return M2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M2(e,t)}}function $oe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Loe(e){return Doe(e)||Noe(e)||Moe(e)||$oe()}var yu="",$2="",gI="",vI="",Foe=Pc&&"ontouchstart"in document.documentElement;if(Pc){var A1={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},zoe=document.createElement("p"),I1=zoe.style,Boe="Transform";for(var T1 in A1)if(T1+Boe in I1){yu=T1,$2=A1[T1];break}yu==="Webkit"&&"msHyphens"in I1&&(yu="ms",$2=A1.ms,vI="edge"),yu==="Webkit"&&"-apple-trailing-word"in I1&&(gI="apple")}var He={js:yu,css:$2,vendor:gI,browser:vI,isTouch:Foe};function Hoe(e){return e[1]==="-"||He.js==="ms"?e:"@"+He.css+"keyframes"+e.substr(10)}var Uoe={noPrefill:["appearance"],supportedProperty:function(t){return t!=="appearance"?!1:He.js==="ms"?"-webkit-"+t:He.css+t}},Woe={noPrefill:["color-adjust"],supportedProperty:function(t){return t!=="color-adjust"?!1:He.js==="Webkit"?He.css+"print-"+t:t}},Voe=/[-\s]+(.)?/g;function qoe(e,t){return t?t.toUpperCase():""}function q3(e){return e.replace(Voe,qoe)}function Da(e){return q3("-"+e)}var Goe={noPrefill:["mask"],supportedProperty:function(t,n){if(!/^mask/.test(t))return!1;if(He.js==="Webkit"){var r="mask-image";if(q3(r)in n)return t;if(He.js+Da(r)in n)return He.css+t}return t}},Koe={noPrefill:["text-orientation"],supportedProperty:function(t){return t!=="text-orientation"?!1:He.vendor==="apple"&&!He.isTouch?He.css+t:t}},Yoe={noPrefill:["transform"],supportedProperty:function(t,n,r){return t!=="transform"?!1:r.transform?t:He.css+t}},Xoe={noPrefill:["transition"],supportedProperty:function(t,n,r){return t!=="transition"?!1:r.transition?t:He.css+t}},Qoe={noPrefill:["writing-mode"],supportedProperty:function(t){return t!=="writing-mode"?!1:He.js==="Webkit"||He.js==="ms"&&He.browser!=="edge"?He.css+t:t}},Joe={noPrefill:["user-select"],supportedProperty:function(t){return t!=="user-select"?!1:He.js==="Moz"||He.js==="ms"||He.vendor==="apple"?He.css+t:t}},Zoe={supportedProperty:function(t,n){if(!/^break-/.test(t))return!1;if(He.js==="Webkit"){var r="WebkitColumn"+Da(t);return r in n?He.css+"column-"+t:!1}if(He.js==="Moz"){var i="page"+Da(t);return i in n?"page-"+t:!1}return!1}},eae={supportedProperty:function(t,n){if(!/^(border|margin|padding)-inline/.test(t))return!1;if(He.js==="Moz")return t;var r=t.replace("-inline","");return He.js+Da(r)in n?He.css+r:!1}},tae={supportedProperty:function(t,n){return q3(t)in n?t:!1}},nae={supportedProperty:function(t,n){var r=Da(t);return t[0]==="-"||t[0]==="-"&&t[1]==="-"?t:He.js+r in n?He.css+t:He.js!=="Webkit"&&"Webkit"+r in n?"-webkit-"+t:!1}},rae={supportedProperty:function(t){return t.substring(0,11)!=="scroll-snap"?!1:He.js==="ms"?""+He.css+t:t}},iae={supportedProperty:function(t){return t!=="overscroll-behavior"?!1:He.js==="ms"?He.css+"scroll-chaining":t}},oae={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},aae={supportedProperty:function(t,n){var r=oae[t];return r&&He.js+Da(r)in n?He.css+r:!1}},yI={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},sae=Object.keys(yI),lae=function(t){return He.css+t},cae={supportedProperty:function(t,n,r){var i=r.multiple;if(sae.indexOf(t)>-1){var o=yI[t];if(!Array.isArray(o))return He.js+Da(o)in n?He.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(He.js+Da(o[0])in n))return!1;return o.map(lae)}return!1}},bI=[Uoe,Woe,Goe,Koe,Yoe,Xoe,Qoe,Joe,Zoe,eae,tae,nae,rae,iae,aae,cae],x5=bI.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),uae=bI.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,Loe(t.noPrefill)),e},[]),bu,is={};if(Pc){bu=document.createElement("p");var O1=window.getComputedStyle(document.documentElement,"");for(var D1 in O1)isNaN(D1)||(is[O1[D1]]=O1[D1]);uae.forEach(function(e){return delete is[e]})}function L2(e,t){if(t===void 0&&(t={}),!bu)return e;if(is[e]!=null)return is[e];(e==="transition"||e==="transform")&&(t[e]=e in bu.style);for(var n=0;n<x5.length&&(is[e]=x5[n](e,bu.style,t),!is[e]);n++);try{bu.style[e]=""}catch{return!1}return is[e]}var pl={},dae={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},fae=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,ta;function pae(e,t,n){if(t==="var")return"var";if(t==="all")return"all";if(n==="all")return", all";var r=t?L2(t):", "+L2(n);return r||t||n}Pc&&(ta=document.createElement("p"));function S5(e,t){var n=t;if(!ta||e==="content")return t;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var r=e+n;if(pl[r]!=null)return pl[r];try{ta.style[e]=n}catch{return pl[r]=!1,!1}if(dae[e])n=n.replace(fae,pae);else if(ta.style[e]===""&&(n=He.css+n,n==="-ms-flex"&&(ta.style[e]="-ms-flexbox"),ta.style[e]=n,ta.style[e]===""))return pl[r]=!1,!1;return ta.style[e]="",pl[r]=n,pl[r]}function hae(){function e(i){if(i.type==="keyframes"){var o=i;o.at=Hoe(o.at)}}function t(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(t);continue}var s=!1,u=L2(o);u&&u!==o&&(s=!0);var l=!1,d=S5(u,vs(a));d&&d!==a&&(l=!0),(s||l)&&(s&&delete i[o],i[u||o]=d||a)}return i}function n(i,o){return o.type!=="style"?i:t(i)}function r(i,o){return S5(o,vs(i))||i}return{onProcessRule:e,onProcessStyle:n,onChangeValue:r}}function mae(){var e=function(n,r){return n.length===r.length?n>r?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var i={},o=Object.keys(n).sort(e),a=0;a<o.length;a++)i[o[a]]=n[o[a]];return i}}}var gae=function(t){return t===void 0&&(t={}),{plugins:[toe(),ioe(t.observable),loe(),hoe(),voe(),woe(),xoe(),koe(),Roe(t.defaultUnit),Ooe(),hae(),mae()]}};const wI=gae;function vae(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var a=n[o];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0}function yae(e){var t={};return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bae=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,wae=yae(function(e){return bae.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),xae=1e4,Sae=W3(wI()),Cae=function(t){t===void 0&&(t=Sae);var n=new Map,r=0,i,o=function(){return(!i||i.rules.index.length>xae)&&(i=t.createStyleSheet().attach()),i};function a(){var s=arguments,u=JSON.stringify(s),l=n.get(u);if(l)return l.className;var d=[];for(var f in s){var m=s[f];if(!Array.isArray(m)){d.push(m);continue}for(var g=0;g<m.length;g++)d.push(m[g])}for(var y={},v=[],_=0;_<d.length;_++){var x=d[_];if(x){var S=x;if(typeof x=="string"){var C=n.get(x);C&&(C.labels.length&&v.push.apply(v,C.labels),S=C.style)}S.label&&v.indexOf(S.label)===-1&&v.push(S.label),Object.assign(y,S)}}delete y.label;var p=v.length===0?"css":v.join("-"),w=p+"-"+r++;o().addRule(w,y);var b=o().classes[w],k={style:y,labels:v,className:b};return n.set(u,k),n.set(b,k),b}return a.getSheet=o,a},_ae=Cae();const kae=_ae;var jae=function(t){return t.displayName||t.name||"Component"},Eae=function(t){var n,r;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(Array.isArray(n)&&o.length===n.length){for(var s=!0,u=0;u<o.length;u++)o[u]!==n[u]&&(s=!1);if(s)return r}return n=o,r=t.apply(void 0,o),r}},Rae=function(t,n){var r=pe({},t);for(var i in n)r[i]=i in r?r[i]+" "+n[i]:n[i];return r},Pae=Number.MIN_SAFE_INTEGER||-1e9,xI=function(){return Pae++},vm=h.createContext({classNamePrefix:"",disableStylesGeneration:!1,isSSR:!Pc}),C5=new Map,G3=function(t,n){var r=t.managers;if(r)return r[n]||(r[n]=new v5),r[n];var i=C5.get(n);return i||(i=new v5,C5.set(n,i)),i},_5=function(t){var n=t.sheet,r=t.context,i=t.index,o=t.theme;if(n){var a=G3(r,i);a.manage(o),r.registry&&r.registry.add(n)}},Aae=function(t){if(t.sheet){var n=G3(t.context,t.index);n.unmanage(t.theme)}},SI=W3(wI()),CI=new WeakMap,_I=function(t){return CI.get(t)},Iae=function(t,n){CI.set(t,n)},Tae=function(t){var n=t.styles;return typeof n!="function"?n:n(t.theme)};function Oae(e,t){var n;e.context.id&&e.context.id.minify!=null&&(n=e.context.id.minify);var r=e.context.classNamePrefix||"";e.name&&!n&&(r+=e.name.replace(/\s/g,"-")+"-");var i="";return e.name&&(i=e.name+", "),i+=typeof e.styles=="function"?"Themed":"Unthemed",pe({},e.sheetOptions,{index:e.index,meta:i,classNamePrefix:r,link:t,generateId:e.sheetOptions&&e.sheetOptions.generateId?e.sheetOptions.generateId:e.context.generateId})}var Dae=function(t){if(!t.context.disableStylesGeneration){var n=G3(t.context,t.index),r=n.get(t.theme);if(r)return r;var i=t.context.jss||SI,o=Tae(t),a=cI(o),s=i.createStyleSheet(o,Oae(t,a!==null));return Iae(s,{dynamicStyles:a,styles:o}),n.add(t.theme,s),s}},Nae=function(t,n){for(var r in n)t.deleteRule(n[r])},Mae=function(t,n,r){for(var i in r)n.updateOne(r[i],t)},$ae=function(t,n){var r=_I(t);if(r){var i={};for(var o in r.dynamicStyles)for(var a=t.rules.index.length,s=t.addRule(o,r.dynamicStyles[o]),u=a;u<t.rules.index.length;u++){var l=t.rules.index[u];t.updateOne(l,n),i[s===l?o:l.key]=l}return i}},Lae=function(t,n){if(!n)return t.classes;var r=_I(t);if(!r)return t.classes;var i={};for(var o in r.styles)i[o]=t.classes[o],o in n&&(i[o]+=" "+t.classes[n[o].key]);return i};function k5(e){return e?h.useEffect:le.useInsertionEffect||h.useLayoutEffect}var N1={},K3=function(t,n){n===void 0&&(n={});var r=n,i=r.index,o=i===void 0?xI():i,a=r.theming,s=r.name,u=Vg(r,["index","theming","name"]),l=a&&a.context||n0,d=function(g){return typeof t=="function"&&(g||h.useContext(l))||N1},f={};return function(g){var y=h.useRef(!0),v=h.useContext(vm),_=d(g&&g.theme),x=h.useMemo(function(){var w=Dae({context:v,styles:t,name:s,theme:_,index:o,sheetOptions:u});return w&&v.isSSR&&_5({index:o,context:v,sheet:w,theme:_}),[w,w?$ae(w,g):null]},[v,_]),S=x[0],C=x[1];k5(v.isSSR)(function(){S&&C&&!y.current&&Mae(g,S,C)},[g]),k5(v.isSSR)(function(){return S&&_5({index:o,context:v,sheet:S,theme:_}),function(){S&&(Aae({index:o,context:v,sheet:S,theme:_}),C&&Nae(S,C))}},[S]);var p=h.useMemo(function(){return S&&C?Lae(S,C):f},[S,C]);return h.useDebugValue(p),h.useDebugValue(_===N1?"No theme":_),h.useEffect(function(){y.current=!1}),p}},Fae=function(t){return t.children||null},j5=function(t,n){n===void 0&&(n={});var r=n,i=r.index,o=i===void 0?xI():i,a=r.theming,s=r.injectTheme,u=Vg(r,["index","theming","injectTheme"]),l=a?a.context:n0;return function(d){d===void 0&&(d=Fae);var f=jae(d),m=Eae(function(_,x){return x?Rae(_,x):_}),g=Object.assign(u,{theming:a,index:o,name:f}),y=K3(t,g),v=h.forwardRef(function(_,x){var S=h.useContext(l),C=pe({},_);s&&C.theme==null&&(C.theme=S);var p=y(C),w=m(p,_.classes);return h.createElement(d,pe({},C,{classes:w,ref:x}))});return v.displayName="WithStyles("+f+")",v.defaultProps=pe({},d.defaultProps),v.InnerComponent=d,tI(v,d)}},zae={};function Bae(e){var t=h.useRef({}),n=h.useRef(),r=h.useRef(null),i=function(s,u){u===void 0&&(u=zae);var l=e.registry,d=e.classNamePrefix,f=e.jss,m=e.generateId,g=e.disableStylesGeneration,y=e.media,v=e.id,_=e.isSSR,x=pe({},s);return l&&(x.registry=l,l!==r.current&&(t.current={},r.current=l)),x.managers=t.current,v!==void 0&&(x.id=v),m!==void 0?x.generateId=m:(!x.generateId||!u||x.id!==u.id)&&(x.generateId=mm(x.id)),d&&(x.classNamePrefix=(x.classNamePrefix||"")+d),y!==void 0&&(x.media=y),f&&(x.jss=f),g!==void 0&&(x.disableStylesGeneration=g),_!==void 0&&(x.isSSR=_),u&&vae(u,x)?u:x},o=function(s){var u=e.children,l=i(s,n.current);return n.current=l,h.createElement(vm.Provider,{value:l},u)};return h.createElement(vm.Consumer,null,o)}var Hae=function(t){var n=[],r,i=[];for(var o in t){var a=t[o];if(a)if(typeof a=="function")n.push(a);else{r||(r={}),Object.assign(r,a);var s=r,u=s.label;u&&i.indexOf(u)===-1&&i.push(u)}}var l={},d=i.length===0?"sc":i.join("-");return r&&("label"in r&&delete r.label,l[d]=r),n.length===1&&(l.scd=n[0]),n.length>1&&(l.scd=function(f){for(var m={},g=0;g<n.length;g++){var y=n[g](f);y&&Object.assign(m,y)}return m}),{styles:l,label:d}},kI=Symbol("react-jss-styled"),Uae=function(t,n){var r=n.shouldForwardProp,i=t[kI],o=r||i;return r&&i&&(o=function(s){return i(s)&&r(s)}),o},Wae=function(t,n,r){var i={};for(var o in t){if(n){n(o)===!0&&(i[o]=t[o]);continue}if(r){wae(o)&&(i[o]=t[o]);continue}i[o]=t[o]}return i},Vae=function(t,n){n===void 0&&(n={});var r=n,i=r.theming,o=typeof t=="string",a=i?i.context:n0,s=Uae(t,n),u=n;u.shouldForwardProp;var l=Vg(u,["shouldForwardProp"]);return function(){var f=Hae(arguments),m=f.styles,g=f.label,y=K3(m,l),v=function(x){var S=x.as,C=x.className,p=h.useContext(a),w=Object.assign({theme:p},x),b=y(w),k=Wae(x,s,o),E=((b[g]||b.sc||"")+" "+(b.scd||"")).trim();return k.className=C?C+" "+E:E,!o&&s&&(t[kI]=s),o&&S?h.createElement(S,k):h.createElement(t,k)};return v}},jI=function(t){return t===void 0&&(t=kae),function(r,i){var o=arguments;if(i&&i.css){var a=t(i.css),s=Object.assign({},i);s.className=i.className?i.className+" "+a:a,delete s.css,o[1]=s}return h.createElement.apply(void 0,o)}},qae=jI();const Gae=Object.freeze(Object.defineProperty({__proto__:null,JssContext:vm,JssProvider:Bae,SheetsRegistry:aI,ThemeProvider:pie,createGenerateId:mm,createJsx:jI,createTheming:rI,createUseStyles:K3,default:j5,jss:SI,jsx:qae,styled:Vae,useTheme:hie,withStyles:j5,withTheme:fie},Symbol.toStringTag,{value:"Module"})),EI=qk(Gae);var Y3={},RI={exports:{}};(function(e){(function(){function t(p){var w={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(p===!1)return JSON.parse(JSON.stringify(w));var b={};for(var k in w)w.hasOwnProperty(k)&&(b[k]=w[k].defaultValue);return b}function n(){var p=t(!0),w={};for(var b in p)p.hasOwnProperty(b)&&(w[b]=!0);return w}var r={},i={},o={},a=t(!0),s="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(p,w){return a[p]=w,this},r.getOption=function(p){return a[p]},r.getOptions=function(){return a},r.resetOptions=function(){a=t(!0)},r.setFlavor=function(p){if(!u.hasOwnProperty(p))throw Error(p+" flavor was not found");r.resetOptions();var w=u[p];s=p;for(var b in w)w.hasOwnProperty(b)&&(a[b]=w[b])},r.getFlavor=function(){return s},r.getFlavorOptions=function(p){if(u.hasOwnProperty(p))return u[p]},r.getDefaultOptions=function(p){return t(p)},r.subParser=function(p,w){if(r.helper.isString(p))if(typeof w<"u")i[p]=w;else{if(i.hasOwnProperty(p))return i[p];throw Error("SubParser named "+p+" not registered!")}},r.extension=function(p,w){if(!r.helper.isString(p))throw Error("Extension 'name' must be a string");if(p=r.helper.stdExtName(p),r.helper.isUndefined(w)){if(!o.hasOwnProperty(p))throw Error("Extension named "+p+" is not registered!");return o[p]}else{typeof w=="function"&&(w=w()),r.helper.isArray(w)||(w=[w]);var b=l(w,p);if(b.valid)o[p]=w;else throw Error(b.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(p){delete o[p]},r.resetExtensions=function(){o={}};function l(p,w){var b=w?"Error in "+w+" extension->":"Error in unnamed extension",k={valid:!0,error:""};r.helper.isArray(p)||(p=[p]);for(var E=0;E<p.length;++E){var I=b+" sub-extension "+E+": ",j=p[E];if(typeof j!="object")return k.valid=!1,k.error=I+"must be an object, but "+typeof j+" given",k;if(!r.helper.isString(j.type))return k.valid=!1,k.error=I+'property "type" must be a string, but '+typeof j.type+" given",k;var P=j.type=j.type.toLowerCase();if(P==="language"&&(P=j.type="lang"),P==="html"&&(P=j.type="output"),P!=="lang"&&P!=="output"&&P!=="listener")return k.valid=!1,k.error=I+"type "+P+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',k;if(P==="listener"){if(r.helper.isUndefined(j.listeners))return k.valid=!1,k.error=I+'. Extensions of type "listener" must have a property called "listeners"',k}else if(r.helper.isUndefined(j.filter)&&r.helper.isUndefined(j.regex))return k.valid=!1,k.error=I+P+' extensions must define either a "regex" property or a "filter" method',k;if(j.listeners){if(typeof j.listeners!="object")return k.valid=!1,k.error=I+'"listeners" property must be an object but '+typeof j.listeners+" given",k;for(var B in j.listeners)if(j.listeners.hasOwnProperty(B)&&typeof j.listeners[B]!="function")return k.valid=!1,k.error=I+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+B+" must be a function but "+typeof j.listeners[B]+" given",k}if(j.filter){if(typeof j.filter!="function")return k.valid=!1,k.error=I+'"filter" must be a function, but '+typeof j.filter+" given",k}else if(j.regex){if(r.helper.isString(j.regex)&&(j.regex=new RegExp(j.regex,"g")),!(j.regex instanceof RegExp))return k.valid=!1,k.error=I+'"regex" property must either be a string or a RegExp object, but '+typeof j.regex+" given",k;if(r.helper.isUndefined(j.replace))return k.valid=!1,k.error=I+'"regex" extensions must implement a replace string or function',k}}return k}r.validateExtension=function(p){var w=l(p,null);return w.valid?!0:(console.warn(w.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(p){return typeof p=="string"||p instanceof String},r.helper.isFunction=function(p){var w={};return p&&w.toString.call(p)==="[object Function]"},r.helper.isArray=function(p){return Array.isArray(p)},r.helper.isUndefined=function(p){return typeof p>"u"},r.helper.forEach=function(p,w){if(r.helper.isUndefined(p))throw new Error("obj param is required");if(r.helper.isUndefined(w))throw new Error("callback param is required");if(!r.helper.isFunction(w))throw new Error("callback param must be a function/closure");if(typeof p.forEach=="function")p.forEach(w);else if(r.helper.isArray(p))for(var b=0;b<p.length;b++)w(p[b],b,p);else if(typeof p=="object")for(var k in p)p.hasOwnProperty(k)&&w(p[k],k,p);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(p){return p.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function d(p,w){var b=w.charCodeAt(0);return"¨E"+b+"E"}r.helper.escapeCharactersCallback=d,r.helper.escapeCharacters=function(p,w,b){var k="(["+w.replace(/([\[\]\\])/g,"\\$1")+"])";b&&(k="\\\\"+k);var E=new RegExp(k,"g");return p=p.replace(E,d),p},r.helper.unescapeHTMLEntities=function(p){return p.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")};var f=function(p,w,b,k){var E=k||"",I=E.indexOf("g")>-1,j=new RegExp(w+"|"+b,"g"+E.replace(/g/g,"")),P=new RegExp(w,E.replace(/g/g,"")),B=[],W,D,L,T,V;do for(W=0;L=j.exec(p);)if(P.test(L[0]))W++||(D=j.lastIndex,T=D-L[0].length);else if(W&&!--W){V=L.index+L[0].length;var H={left:{start:T,end:D},match:{start:D,end:L.index},right:{start:L.index,end:V},wholeMatch:{start:T,end:V}};if(B.push(H),!I)return B}while(W&&(j.lastIndex=D));return B};r.helper.matchRecursiveRegExp=function(p,w,b,k){for(var E=f(p,w,b,k),I=[],j=0;j<E.length;++j)I.push([p.slice(E[j].wholeMatch.start,E[j].wholeMatch.end),p.slice(E[j].match.start,E[j].match.end),p.slice(E[j].left.start,E[j].left.end),p.slice(E[j].right.start,E[j].right.end)]);return I},r.helper.replaceRecursiveRegExp=function(p,w,b,k,E){if(!r.helper.isFunction(w)){var I=w;w=function(){return I}}var j=f(p,b,k,E),P=p,B=j.length;if(B>0){var W=[];j[0].wholeMatch.start!==0&&W.push(p.slice(0,j[0].wholeMatch.start));for(var D=0;D<B;++D)W.push(w(p.slice(j[D].wholeMatch.start,j[D].wholeMatch.end),p.slice(j[D].match.start,j[D].match.end),p.slice(j[D].left.start,j[D].left.end),p.slice(j[D].right.start,j[D].right.end))),D<B-1&&W.push(p.slice(j[D].wholeMatch.end,j[D+1].wholeMatch.start));j[B-1].wholeMatch.end<p.length&&W.push(p.slice(j[B-1].wholeMatch.end)),P=W.join("")}return P},r.helper.regexIndexOf=function(p,w,b){if(!r.helper.isString(p))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(w instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var k=p.substring(b||0).search(w);return k>=0?k+(b||0):k},r.helper.splitAtIndex=function(p,w){if(!r.helper.isString(p))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[p.substring(0,w),p.substring(w)]},r.helper.encodeEmailAddress=function(p){var w=[function(b){return"&#"+b.charCodeAt(0)+";"},function(b){return"&#x"+b.charCodeAt(0).toString(16)+";"},function(b){return b}];return p=p.replace(/./g,function(b){if(b==="@")b=w[Math.floor(Math.random()*2)](b);else{var k=Math.random();b=k>.9?w[2](b):k>.45?w[1](b):w[0](b)}return b}),p},r.helper.padEnd=function(w,b,k){return b=b>>0,k=String(k||" "),w.length>b?String(w):(b=b-w.length,b>k.length&&(k+=k.repeat(b/k.length)),String(w)+k.slice(0,b))},typeof console>"u"&&(console={warn:function(p){alert(p)},log:function(p){alert(p)},error:function(p){throw p}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(p){var w={},b=[],k=[],E={},I=s,j={parsed:{},raw:"",format:""};P();function P(){p=p||{};for(var T in a)a.hasOwnProperty(T)&&(w[T]=a[T]);if(typeof p=="object")for(var V in p)p.hasOwnProperty(V)&&(w[V]=p[V]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof p+" was passed instead.");w.extensions&&r.helper.forEach(w.extensions,B)}function B(T,V){if(V=V||null,r.helper.isString(T))if(T=r.helper.stdExtName(T),V=T,r.extensions[T]){console.warn("DEPRECATION WARNING: "+T+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),W(r.extensions[T],T);return}else if(!r.helper.isUndefined(o[T]))T=o[T];else throw Error('Extension "'+T+'" could not be loaded. It was either not found or is not a valid extension.');typeof T=="function"&&(T=T()),r.helper.isArray(T)||(T=[T]);var H=l(T,V);if(!H.valid)throw Error(H.error);for(var q=0;q<T.length;++q){switch(T[q].type){case"lang":b.push(T[q]);break;case"output":k.push(T[q]);break}if(T[q].hasOwnProperty("listeners"))for(var N in T[q].listeners)T[q].listeners.hasOwnProperty(N)&&D(N,T[q].listeners[N])}}function W(T,V){typeof T=="function"&&(T=T(new r.Converter)),r.helper.isArray(T)||(T=[T]);var H=l(T,V);if(!H.valid)throw Error(H.error);for(var q=0;q<T.length;++q)switch(T[q].type){case"lang":b.push(T[q]);break;case"output":k.push(T[q]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function D(T,V){if(!r.helper.isString(T))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof T+" given");if(typeof V!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof V+" given");E.hasOwnProperty(T)||(E[T]=[]),E[T].push(V)}function L(T){var V=T.match(/^\s*/)[0].length,H=new RegExp("^\\s{0,"+V+"}","gm");return T.replace(H,"")}this._dispatch=function(V,H,q,N){if(E.hasOwnProperty(V))for(var J=0;J<E[V].length;++J){var se=E[V][J](V,H,this,q,N);se&&typeof se<"u"&&(H=se)}return H},this.listen=function(T,V){return D(T,V),this},this.makeHtml=function(T){if(!T)return T;var V={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:b,outputModifiers:k,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return T=T.replace(/¨/g,"¨T"),T=T.replace(/\$/g,"¨D"),T=T.replace(/\r\n/g,`
`),T=T.replace(/\r/g,`
`),T=T.replace(/\u00A0/g," "),w.smartIndentationFix&&(T=L(T)),T=`
`+T+`
`,T=r.subParser("detab")(T,w,V),T=T.replace(/^[ \t]+$/mg,""),r.helper.forEach(b,function(H){T=r.subParser("runExtension")(H,T,w,V)}),T=r.subParser("metadata")(T,w,V),T=r.subParser("hashPreCodeTags")(T,w,V),T=r.subParser("githubCodeBlocks")(T,w,V),T=r.subParser("hashHTMLBlocks")(T,w,V),T=r.subParser("hashCodeTags")(T,w,V),T=r.subParser("stripLinkDefinitions")(T,w,V),T=r.subParser("blockGamut")(T,w,V),T=r.subParser("unhashHTMLSpans")(T,w,V),T=r.subParser("unescapeSpecialChars")(T,w,V),T=T.replace(/¨D/g,"$$"),T=T.replace(/¨T/g,"¨"),T=r.subParser("completeHTMLDocument")(T,w,V),r.helper.forEach(k,function(H){T=r.subParser("runExtension")(H,T,w,V)}),j=V.metadata,T},this.makeMarkdown=this.makeMd=function(T,V){if(T=T.replace(/\r\n/g,`
`),T=T.replace(/\r/g,`
`),T=T.replace(/>[ \t]+</,">¨NBSP;<"),!V)if(window&&window.document)V=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var H=V.createElement("div");H.innerHTML=T;var q={preList:Ce(H)};z(H);for(var N=H.childNodes,J="",se=0;se<N.length;se++)J+=r.subParser("makeMarkdown.node")(N[se],q);function z(Ee){for(var ye=0;ye<Ee.childNodes.length;++ye){var Re=Ee.childNodes[ye];Re.nodeType===3?/\S/.test(Re.nodeValue)?(Re.nodeValue=Re.nodeValue.split(`
`).join(" "),Re.nodeValue=Re.nodeValue.replace(/(\s)+/g,"$1")):(Ee.removeChild(Re),--ye):Re.nodeType===1&&z(Re)}}function Ce(Ee){for(var ye=Ee.querySelectorAll("pre"),Re=[],Oe=0;Oe<ye.length;++Oe)if(ye[Oe].childElementCount===1&&ye[Oe].firstChild.tagName.toLowerCase()==="code"){var rt=ye[Oe].firstChild.innerHTML.trim(),Pe=ye[Oe].firstChild.getAttribute("data-language")||"";if(Pe==="")for(var zt=ye[Oe].firstChild.className.split(" "),dt=0;dt<zt.length;++dt){var tn=zt[dt].match(/^language-(.+)$/);if(tn!==null){Pe=tn[1];break}}rt=r.helper.unescapeHTMLEntities(rt),Re.push(rt),ye[Oe].outerHTML='<precode language="'+Pe+'" precodenum="'+Oe.toString()+'"></precode>'}else Re.push(ye[Oe].innerHTML),ye[Oe].innerHTML="",ye[Oe].setAttribute("prenum",Oe.toString());return Re}return J},this.setOption=function(T,V){w[T]=V},this.getOption=function(T){return w[T]},this.getOptions=function(){return w},this.addExtension=function(T,V){V=V||null,B(T,V)},this.useExtension=function(T){B(T)},this.setFlavor=function(T){if(!u.hasOwnProperty(T))throw Error(T+" flavor was not found");var V=u[T];I=T;for(var H in V)V.hasOwnProperty(H)&&(w[H]=V[H])},this.getFlavor=function(){return I},this.removeExtension=function(T){r.helper.isArray(T)||(T=[T]);for(var V=0;V<T.length;++V){for(var H=T[V],q=0;q<b.length;++q)b[q]===H&&b[q].splice(q,1);for(var N=0;N<k.length;++q)k[N]===H&&k[N].splice(q,1)}},this.getAllExtensions=function(){return{language:b,output:k}},this.getMetadata=function(T){return T?j.raw:j.parsed},this.getMetadataFormat=function(){return j.format},this._setMetadataPair=function(T,V){j.parsed[T]=V},this._setMetadataFormat=function(T){j.format=T},this._setMetadataRaw=function(T){j.raw=T}},r.subParser("anchors",function(p,w,b){p=b.converter._dispatch("anchors.before",p,w,b);var k=function(E,I,j,P,B,W,D){if(r.helper.isUndefined(D)&&(D=""),j=j.toLowerCase(),E.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)P="";else if(!P)if(j||(j=I.toLowerCase().replace(/ ?\n/g," ")),P="#"+j,!r.helper.isUndefined(b.gUrls[j]))P=b.gUrls[j],r.helper.isUndefined(b.gTitles[j])||(D=b.gTitles[j]);else return E;P=P.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var L='<a href="'+P+'"';return D!==""&&D!==null&&(D=D.replace(/"/g,"""),D=D.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),L+=' title="'+D+'"'),w.openLinksInNewWindow&&!/^#/.test(P)&&(L+=' rel="noopener noreferrer" target="¨E95Eblank"'),L+=">"+I+"</a>",L};return p=p.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,k),p=p.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,k),p=p.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,k),p=p.replace(/\[([^\[\]]+)]()()()()()/g,k),w.ghMentions&&(p=p.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(E,I,j,P,B){if(j==="\\")return I+P;if(!r.helper.isString(w.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var W=w.ghMentionsLink.replace(/\{u}/g,B),D="";return w.openLinksInNewWindow&&(D=' rel="noopener noreferrer" target="¨E95Eblank"'),I+'<a href="'+W+'"'+D+">"+P+"</a>"})),p=b.converter._dispatch("anchors.after",p,w,b),p});var m=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,y=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,v=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,x=function(p){return function(w,b,k,E,I,j,P){k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var B=k,W="",D="",L=b||"",T=P||"";return/^www\./i.test(k)&&(k=k.replace(/^www\./i,"http://www.")),p.excludeTrailingPunctuationFromURLs&&j&&(W=j),p.openLinksInNewWindow&&(D=' rel="noopener noreferrer" target="¨E95Eblank"'),L+'<a href="'+k+'"'+D+">"+B+"</a>"+W+T}},S=function(p,w){return function(b,k,E){var I="mailto:";return k=k||"",E=r.subParser("unescapeSpecialChars")(E,p,w),p.encodeEmails?(I=r.helper.encodeEmailAddress(I+E),E=r.helper.encodeEmailAddress(E)):I=I+E,k+'<a href="'+I+'">'+E+"</a>"}};r.subParser("autoLinks",function(p,w,b){return p=b.converter._dispatch("autoLinks.before",p,w,b),p=p.replace(y,x(w)),p=p.replace(_,S(w,b)),p=b.converter._dispatch("autoLinks.after",p,w,b),p}),r.subParser("simplifiedAutoLinks",function(p,w,b){return w.simplifiedAutoLink&&(p=b.converter._dispatch("simplifiedAutoLinks.before",p,w,b),w.excludeTrailingPunctuationFromURLs?p=p.replace(g,x(w)):p=p.replace(m,x(w)),p=p.replace(v,S(w,b)),p=b.converter._dispatch("simplifiedAutoLinks.after",p,w,b)),p}),r.subParser("blockGamut",function(p,w,b){return p=b.converter._dispatch("blockGamut.before",p,w,b),p=r.subParser("blockQuotes")(p,w,b),p=r.subParser("headers")(p,w,b),p=r.subParser("horizontalRule")(p,w,b),p=r.subParser("lists")(p,w,b),p=r.subParser("codeBlocks")(p,w,b),p=r.subParser("tables")(p,w,b),p=r.subParser("hashHTMLBlocks")(p,w,b),p=r.subParser("paragraphs")(p,w,b),p=b.converter._dispatch("blockGamut.after",p,w,b),p}),r.subParser("blockQuotes",function(p,w,b){p=b.converter._dispatch("blockQuotes.before",p,w,b),p=p+`
`;var k=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return w.splitAdjacentBlockquotes&&(k=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),p=p.replace(k,function(E){return E=E.replace(/^[ \t]*>[ \t]?/gm,""),E=E.replace(/¨0/g,""),E=E.replace(/^[ \t]+$/gm,""),E=r.subParser("githubCodeBlocks")(E,w,b),E=r.subParser("blockGamut")(E,w,b),E=E.replace(/(^|\n)/g,"$1 "),E=E.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(I,j){var P=j;return P=P.replace(/^ /mg,"¨0"),P=P.replace(/¨0/g,""),P}),r.subParser("hashBlock")(`<blockquote>
`+E+`
</blockquote>`,w,b)}),p=b.converter._dispatch("blockQuotes.after",p,w,b),p}),r.subParser("codeBlocks",function(p,w,b){p=b.converter._dispatch("codeBlocks.before",p,w,b),p+="¨0";var k=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return p=p.replace(k,function(E,I,j){var P=I,B=j,W=`
`;return P=r.subParser("outdent")(P,w,b),P=r.subParser("encodeCode")(P,w,b),P=r.subParser("detab")(P,w,b),P=P.replace(/^\n+/g,""),P=P.replace(/\n+$/g,""),w.omitExtraWLInCodeBlocks&&(W=""),P="<pre><code>"+P+W+"</code></pre>",r.subParser("hashBlock")(P,w,b)+B}),p=p.replace(/¨0/,""),p=b.converter._dispatch("codeBlocks.after",p,w,b),p}),r.subParser("codeSpans",function(p,w,b){return p=b.converter._dispatch("codeSpans.before",p,w,b),typeof p>"u"&&(p=""),p=p.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(k,E,I,j){var P=j;return P=P.replace(/^([ \t]*)/g,""),P=P.replace(/[ \t]*$/g,""),P=r.subParser("encodeCode")(P,w,b),P=E+"<code>"+P+"</code>",P=r.subParser("hashHTMLSpans")(P,w,b),P}),p=b.converter._dispatch("codeSpans.after",p,w,b),p}),r.subParser("completeHTMLDocument",function(p,w,b){if(!w.completeHTMLDocument)return p;p=b.converter._dispatch("completeHTMLDocument.before",p,w,b);var k="html",E=`<!DOCTYPE HTML>
`,I="",j=`<meta charset="utf-8">
`,P="",B="";typeof b.metadata.parsed.doctype<"u"&&(E="<!DOCTYPE "+b.metadata.parsed.doctype+`>
`,k=b.metadata.parsed.doctype.toString().toLowerCase(),(k==="html"||k==="html5")&&(j='<meta charset="utf-8">'));for(var W in b.metadata.parsed)if(b.metadata.parsed.hasOwnProperty(W))switch(W.toLowerCase()){case"doctype":break;case"title":I="<title>"+b.metadata.parsed.title+`</title>
`;break;case"charset":k==="html"||k==="html5"?j='<meta charset="'+b.metadata.parsed.charset+`">
`:j='<meta name="charset" content="'+b.metadata.parsed.charset+`">
`;break;case"language":case"lang":P=' lang="'+b.metadata.parsed[W]+'"',B+='<meta name="'+W+'" content="'+b.metadata.parsed[W]+`">
`;break;default:B+='<meta name="'+W+'" content="'+b.metadata.parsed[W]+`">
`}return p=E+"<html"+P+`>
<head>
`+I+j+B+`</head>
<body>
`+p.trim()+`
</body>
</html>`,p=b.converter._dispatch("completeHTMLDocument.after",p,w,b),p}),r.subParser("detab",function(p,w,b){return p=b.converter._dispatch("detab.before",p,w,b),p=p.replace(/\t(?=\t)/g," "),p=p.replace(/\t/g,"¨A¨B"),p=p.replace(/¨B(.+?)¨A/g,function(k,E){for(var I=E,j=4-I.length%4,P=0;P<j;P++)I+=" ";return I}),p=p.replace(/¨A/g," "),p=p.replace(/¨B/g,""),p=b.converter._dispatch("detab.after",p,w,b),p}),r.subParser("ellipsis",function(p,w,b){return p=b.converter._dispatch("ellipsis.before",p,w,b),p=p.replace(/\.\.\./g,"…"),p=b.converter._dispatch("ellipsis.after",p,w,b),p}),r.subParser("emoji",function(p,w,b){if(!w.emoji)return p;p=b.converter._dispatch("emoji.before",p,w,b);var k=/:([\S]+?):/g;return p=p.replace(k,function(E,I){return r.helper.emojis.hasOwnProperty(I)?r.helper.emojis[I]:E}),p=b.converter._dispatch("emoji.after",p,w,b),p}),r.subParser("encodeAmpsAndAngles",function(p,w,b){return p=b.converter._dispatch("encodeAmpsAndAngles.before",p,w,b),p=p.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),p=p.replace(/<(?![a-z\/?$!])/gi,"<"),p=p.replace(/</g,"<"),p=p.replace(/>/g,">"),p=b.converter._dispatch("encodeAmpsAndAngles.after",p,w,b),p}),r.subParser("encodeBackslashEscapes",function(p,w,b){return p=b.converter._dispatch("encodeBackslashEscapes.before",p,w,b),p=p.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),p=p.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,r.helper.escapeCharactersCallback),p=b.converter._dispatch("encodeBackslashEscapes.after",p,w,b),p}),r.subParser("encodeCode",function(p,w,b){return p=b.converter._dispatch("encodeCode.before",p,w,b),p=p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),p=b.converter._dispatch("encodeCode.after",p,w,b),p}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(p,w,b){p=b.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",p,w,b);var k=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,E=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return p=p.replace(k,function(I){return I.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),p=p.replace(E,function(I){return I.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),p=b.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",p,w,b),p}),r.subParser("githubCodeBlocks",function(p,w,b){return w.ghCodeBlocks?(p=b.converter._dispatch("githubCodeBlocks.before",p,w,b),p+="¨0",p=p.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(k,E,I,j){var P=w.omitExtraWLInCodeBlocks?"":`
`;return j=r.subParser("encodeCode")(j,w,b),j=r.subParser("detab")(j,w,b),j=j.replace(/^\n+/g,""),j=j.replace(/\n+$/g,""),j="<pre><code"+(I?' class="'+I+" language-"+I+'"':"")+">"+j+P+"</code></pre>",j=r.subParser("hashBlock")(j,w,b),`
¨G`+(b.ghCodeBlocks.push({text:k,codeblock:j})-1)+`G
`}),p=p.replace(/¨0/,""),b.converter._dispatch("githubCodeBlocks.after",p,w,b)):p}),r.subParser("hashBlock",function(p,w,b){return p=b.converter._dispatch("hashBlock.before",p,w,b),p=p.replace(/(^\n+|\n+$)/g,""),p=`
¨K`+(b.gHtmlBlocks.push(p)-1)+`K
`,p=b.converter._dispatch("hashBlock.after",p,w,b),p}),r.subParser("hashCodeTags",function(p,w,b){p=b.converter._dispatch("hashCodeTags.before",p,w,b);var k=function(E,I,j,P){var B=j+r.subParser("encodeCode")(I,w,b)+P;return"¨C"+(b.gHtmlSpans.push(B)-1)+"C"};return p=r.helper.replaceRecursiveRegExp(p,k,"<code\\b[^>]*>","</code>","gim"),p=b.converter._dispatch("hashCodeTags.after",p,w,b),p}),r.subParser("hashElement",function(p,w,b){return function(k,E){var I=E;return I=I.replace(/\n\n/g,`
`),I=I.replace(/^\n/,""),I=I.replace(/\n+$/g,""),I=`
¨K`+(b.gHtmlBlocks.push(I)-1)+`K
`,I}}),r.subParser("hashHTMLBlocks",function(p,w,b){p=b.converter._dispatch("hashHTMLBlocks.before",p,w,b);var k=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],E=function(T,V,H,q){var N=T;return H.search(/\bmarkdown\b/)!==-1&&(N=H+b.converter.makeHtml(V)+q),`
¨K`+(b.gHtmlBlocks.push(N)-1)+`K
`};w.backslashEscapesHTMLTags&&(p=p.replace(/\\<(\/?[^>]+?)>/g,function(T,V){return"<"+V+">"}));for(var I=0;I<k.length;++I)for(var j,P=new RegExp("^ {0,3}(<"+k[I]+"\\b[^>]*>)","im"),B="<"+k[I]+"\\b[^>]*>",W="</"+k[I]+">";(j=r.helper.regexIndexOf(p,P))!==-1;){var D=r.helper.splitAtIndex(p,j),L=r.helper.replaceRecursiveRegExp(D[1],E,B,W,"im");if(L===D[1])break;p=D[0].concat(L)}return p=p.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(p,w,b)),p=r.helper.replaceRecursiveRegExp(p,function(T){return`
¨K`+(b.gHtmlBlocks.push(T)-1)+`K
`},"^ {0,3}<!--","-->","gm"),p=p.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(p,w,b)),p=b.converter._dispatch("hashHTMLBlocks.after",p,w,b),p}),r.subParser("hashHTMLSpans",function(p,w,b){p=b.converter._dispatch("hashHTMLSpans.before",p,w,b);function k(E){return"¨C"+(b.gHtmlSpans.push(E)-1)+"C"}return p=p.replace(/<[^>]+?\/>/gi,function(E){return k(E)}),p=p.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(E){return k(E)}),p=p.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(E){return k(E)}),p=p.replace(/<[^>]+?>/gi,function(E){return k(E)}),p=b.converter._dispatch("hashHTMLSpans.after",p,w,b),p}),r.subParser("unhashHTMLSpans",function(p,w,b){p=b.converter._dispatch("unhashHTMLSpans.before",p,w,b);for(var k=0;k<b.gHtmlSpans.length;++k){for(var E=b.gHtmlSpans[k],I=0;/¨C(\d+)C/.test(E);){var j=RegExp.$1;if(E=E.replace("¨C"+j+"C",b.gHtmlSpans[j]),I===10){console.error("maximum nesting of 10 spans reached!!!");break}++I}p=p.replace("¨C"+k+"C",E)}return p=b.converter._dispatch("unhashHTMLSpans.after",p,w,b),p}),r.subParser("hashPreCodeTags",function(p,w,b){p=b.converter._dispatch("hashPreCodeTags.before",p,w,b);var k=function(E,I,j,P){var B=j+r.subParser("encodeCode")(I,w,b)+P;return`
¨G`+(b.ghCodeBlocks.push({text:E,codeblock:B})-1)+`G
`};return p=r.helper.replaceRecursiveRegExp(p,k,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),p=b.converter._dispatch("hashPreCodeTags.after",p,w,b),p}),r.subParser("headers",function(p,w,b){p=b.converter._dispatch("headers.before",p,w,b);var k=isNaN(parseInt(w.headerLevelStart))?1:parseInt(w.headerLevelStart),E=w.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,I=w.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;p=p.replace(E,function(B,W){var D=r.subParser("spanGamut")(W,w,b),L=w.noHeaderId?"":' id="'+P(W)+'"',T=k,V="<h"+T+L+">"+D+"</h"+T+">";return r.subParser("hashBlock")(V,w,b)}),p=p.replace(I,function(B,W){var D=r.subParser("spanGamut")(W,w,b),L=w.noHeaderId?"":' id="'+P(W)+'"',T=k+1,V="<h"+T+L+">"+D+"</h"+T+">";return r.subParser("hashBlock")(V,w,b)});var j=w.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;p=p.replace(j,function(B,W,D){var L=D;w.customizedHeaderId&&(L=D.replace(/\s?\{([^{]+?)}\s*$/,""));var T=r.subParser("spanGamut")(L,w,b),V=w.noHeaderId?"":' id="'+P(D)+'"',H=k-1+W.length,q="<h"+H+V+">"+T+"</h"+H+">";return r.subParser("hashBlock")(q,w,b)});function P(B){var W,D;if(w.customizedHeaderId){var L=B.match(/\{([^{]+?)}\s*$/);L&&L[1]&&(B=L[1])}return W=B,r.helper.isString(w.prefixHeaderId)?D=w.prefixHeaderId:w.prefixHeaderId===!0?D="section-":D="",w.rawPrefixHeaderId||(W=D+W),w.ghCompatibleHeaderId?W=W.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():w.rawHeaderId?W=W.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():W=W.replace(/[^\w]/g,"").toLowerCase(),w.rawPrefixHeaderId&&(W=D+W),b.hashLinkCounts[W]?W=W+"-"+b.hashLinkCounts[W]++:b.hashLinkCounts[W]=1,W}return p=b.converter._dispatch("headers.after",p,w,b),p}),r.subParser("horizontalRule",function(p,w,b){p=b.converter._dispatch("horizontalRule.before",p,w,b);var k=r.subParser("hashBlock")("<hr />",w,b);return p=p.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,k),p=p.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,k),p=p.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,k),p=b.converter._dispatch("horizontalRule.after",p,w,b),p}),r.subParser("images",function(p,w,b){p=b.converter._dispatch("images.before",p,w,b);var k=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,E=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,I=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,j=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,P=/!\[([^\[\]]+)]()()()()()/g;function B(D,L,T,V,H,q,N,J){return V=V.replace(/\s/g,""),W(D,L,T,V,H,q,N,J)}function W(D,L,T,V,H,q,N,J){var se=b.gUrls,z=b.gTitles,Ce=b.gDimensions;if(T=T.toLowerCase(),J||(J=""),D.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)V="";else if(V===""||V===null)if((T===""||T===null)&&(T=L.toLowerCase().replace(/ ?\n/g," ")),V="#"+T,!r.helper.isUndefined(se[T]))V=se[T],r.helper.isUndefined(z[T])||(J=z[T]),r.helper.isUndefined(Ce[T])||(H=Ce[T].width,q=Ce[T].height);else return D;L=L.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),V=V.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var Ee='<img src="'+V+'" alt="'+L+'"';return J&&r.helper.isString(J)&&(J=J.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),Ee+=' title="'+J+'"'),H&&q&&(H=H==="*"?"auto":H,q=q==="*"?"auto":q,Ee+=' width="'+H+'"',Ee+=' height="'+q+'"'),Ee+=" />",Ee}return p=p.replace(j,W),p=p.replace(I,B),p=p.replace(E,W),p=p.replace(k,W),p=p.replace(P,W),p=b.converter._dispatch("images.after",p,w,b),p}),r.subParser("italicsAndBold",function(p,w,b){p=b.converter._dispatch("italicsAndBold.before",p,w,b);function k(E,I,j){return I+E+j}return w.literalMidWordUnderscores?(p=p.replace(/\b___(\S[\s\S]*?)___\b/g,function(E,I){return k(I,"<strong><em>","</em></strong>")}),p=p.replace(/\b__(\S[\s\S]*?)__\b/g,function(E,I){return k(I,"<strong>","</strong>")}),p=p.replace(/\b_(\S[\s\S]*?)_\b/g,function(E,I){return k(I,"<em>","</em>")})):(p=p.replace(/___(\S[\s\S]*?)___/g,function(E,I){return/\S$/.test(I)?k(I,"<strong><em>","</em></strong>"):E}),p=p.replace(/__(\S[\s\S]*?)__/g,function(E,I){return/\S$/.test(I)?k(I,"<strong>","</strong>"):E}),p=p.replace(/_([^\s_][\s\S]*?)_/g,function(E,I){return/\S$/.test(I)?k(I,"<em>","</em>"):E})),w.literalMidWordAsterisks?(p=p.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(E,I,j){return k(j,I+"<strong><em>","</em></strong>")}),p=p.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(E,I,j){return k(j,I+"<strong>","</strong>")}),p=p.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(E,I,j){return k(j,I+"<em>","</em>")})):(p=p.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(E,I){return/\S$/.test(I)?k(I,"<strong><em>","</em></strong>"):E}),p=p.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(E,I){return/\S$/.test(I)?k(I,"<strong>","</strong>"):E}),p=p.replace(/\*([^\s*][\s\S]*?)\*/g,function(E,I){return/\S$/.test(I)?k(I,"<em>","</em>"):E})),p=b.converter._dispatch("italicsAndBold.after",p,w,b),p}),r.subParser("lists",function(p,w,b){function k(j,P){b.gListLevel++,j=j.replace(/\n{2,}$/,`
`),j+="¨0";var B=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,W=/\n[ \t]*\n(?!¨0)/.test(j);return w.disableForced4SpacesIndentedSublists&&(B=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),j=j.replace(B,function(D,L,T,V,H,q,N){N=N&&N.trim()!=="";var J=r.subParser("outdent")(H,w,b),se="";return q&&w.tasklists&&(se=' class="task-list-item" style="list-style-type: none;"',J=J.replace(/^[ \t]*\[(x|X| )?]/m,function(){var z='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return N&&(z+=" checked"),z+=">",z})),J=J.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(z){return"¨A"+z}),L||J.search(/\n{2,}/)>-1?(J=r.subParser("githubCodeBlocks")(J,w,b),J=r.subParser("blockGamut")(J,w,b)):(J=r.subParser("lists")(J,w,b),J=J.replace(/\n$/,""),J=r.subParser("hashHTMLBlocks")(J,w,b),J=J.replace(/\n\n+/g,`
`),W?J=r.subParser("paragraphs")(J,w,b):J=r.subParser("spanGamut")(J,w,b)),J=J.replace("¨A",""),J="<li"+se+">"+J+`</li>
`,J}),j=j.replace(/¨0/g,""),b.gListLevel--,P&&(j=j.replace(/\s+$/,"")),j}function E(j,P){if(P==="ol"){var B=j.match(/^ *(\d+)\./);if(B&&B[1]!=="1")return' start="'+B[1]+'"'}return""}function I(j,P,B){var W=w.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,D=w.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,L=P==="ul"?W:D,T="";if(j.search(L)!==-1)(function H(q){var N=q.search(L),J=E(j,P);N!==-1?(T+=`
<`+P+J+`>
`+k(q.slice(0,N),!!B)+"</"+P+`>
`,P=P==="ul"?"ol":"ul",L=P==="ul"?W:D,H(q.slice(N))):T+=`
<`+P+J+`>
`+k(q,!!B)+"</"+P+`>
`})(j);else{var V=E(j,P);T=`
<`+P+V+`>
`+k(j,!!B)+"</"+P+`>
`}return T}return p=b.converter._dispatch("lists.before",p,w,b),p+="¨0",b.gListLevel?p=p.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(j,P,B){var W=B.search(/[*+-]/g)>-1?"ul":"ol";return I(P,W,!0)}):p=p.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(j,P,B,W){var D=W.search(/[*+-]/g)>-1?"ul":"ol";return I(B,D,!1)}),p=p.replace(/¨0/,""),p=b.converter._dispatch("lists.after",p,w,b),p}),r.subParser("metadata",function(p,w,b){if(!w.metadata)return p;p=b.converter._dispatch("metadata.before",p,w,b);function k(E){b.metadata.raw=E,E=E.replace(/&/g,"&").replace(/"/g,"""),E=E.replace(/\n {4}/g," "),E.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(I,j,P){return b.metadata.parsed[j]=P,""})}return p=p.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(E,I,j){return k(j),"¨M"}),p=p.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(E,I,j){return I&&(b.metadata.format=I),k(j),"¨M"}),p=p.replace(/¨M/g,""),p=b.converter._dispatch("metadata.after",p,w,b),p}),r.subParser("outdent",function(p,w,b){return p=b.converter._dispatch("outdent.before",p,w,b),p=p.replace(/^(\t|[ ]{1,4})/gm,"¨0"),p=p.replace(/¨0/g,""),p=b.converter._dispatch("outdent.after",p,w,b),p}),r.subParser("paragraphs",function(p,w,b){p=b.converter._dispatch("paragraphs.before",p,w,b),p=p.replace(/^\n+/g,""),p=p.replace(/\n+$/g,"");for(var k=p.split(/\n{2,}/g),E=[],I=k.length,j=0;j<I;j++){var P=k[j];P.search(/¨(K|G)(\d+)\1/g)>=0?E.push(P):P.search(/\S/)>=0&&(P=r.subParser("spanGamut")(P,w,b),P=P.replace(/^([ \t]*)/g,"<p>"),P+="</p>",E.push(P))}for(I=E.length,j=0;j<I;j++){for(var B="",W=E[j],D=!1;/¨(K|G)(\d+)\1/.test(W);){var L=RegExp.$1,T=RegExp.$2;L==="K"?B=b.gHtmlBlocks[T]:D?B=r.subParser("encodeCode")(b.ghCodeBlocks[T].text,w,b):B=b.ghCodeBlocks[T].codeblock,B=B.replace(/\$/g,"$$$$"),W=W.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,B),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(W)&&(D=!0)}E[j]=W}return p=E.join(`
`),p=p.replace(/^\n+/g,""),p=p.replace(/\n+$/g,""),b.converter._dispatch("paragraphs.after",p,w,b)}),r.subParser("runExtension",function(p,w,b,k){if(p.filter)w=p.filter(w,k.converter,b);else if(p.regex){var E=p.regex;E instanceof RegExp||(E=new RegExp(E,"g")),w=w.replace(E,p.replace)}return w}),r.subParser("spanGamut",function(p,w,b){return p=b.converter._dispatch("spanGamut.before",p,w,b),p=r.subParser("codeSpans")(p,w,b),p=r.subParser("escapeSpecialCharsWithinTagAttributes")(p,w,b),p=r.subParser("encodeBackslashEscapes")(p,w,b),p=r.subParser("images")(p,w,b),p=r.subParser("anchors")(p,w,b),p=r.subParser("autoLinks")(p,w,b),p=r.subParser("simplifiedAutoLinks")(p,w,b),p=r.subParser("emoji")(p,w,b),p=r.subParser("underline")(p,w,b),p=r.subParser("italicsAndBold")(p,w,b),p=r.subParser("strikethrough")(p,w,b),p=r.subParser("ellipsis")(p,w,b),p=r.subParser("hashHTMLSpans")(p,w,b),p=r.subParser("encodeAmpsAndAngles")(p,w,b),w.simpleLineBreaks?/\n\n¨K/.test(p)||(p=p.replace(/\n+/g,`<br />
`)):p=p.replace(/ +\n/g,`<br />
`),p=b.converter._dispatch("spanGamut.after",p,w,b),p}),r.subParser("strikethrough",function(p,w,b){function k(E){return w.simplifiedAutoLink&&(E=r.subParser("simplifiedAutoLinks")(E,w,b)),"<del>"+E+"</del>"}return w.strikethrough&&(p=b.converter._dispatch("strikethrough.before",p,w,b),p=p.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(E,I){return k(I)}),p=b.converter._dispatch("strikethrough.after",p,w,b)),p}),r.subParser("stripLinkDefinitions",function(p,w,b){var k=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,E=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;p+="¨0";var I=function(j,P,B,W,D,L,T){return P=P.toLowerCase(),B.match(/^data:.+?\/.+?;base64,/)?b.gUrls[P]=B.replace(/\s/g,""):b.gUrls[P]=r.subParser("encodeAmpsAndAngles")(B,w,b),L?L+T:(T&&(b.gTitles[P]=T.replace(/"|'/g,""")),w.parseImgDimensions&&W&&D&&(b.gDimensions[P]={width:W,height:D}),"")};return p=p.replace(E,I),p=p.replace(k,I),p=p.replace(/¨0/,""),p}),r.subParser("tables",function(p,w,b){if(!w.tables)return p;var k=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,E=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function I(D){return/^:[ \t]*--*$/.test(D)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(D)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(D)?' style="text-align:center;"':""}function j(D,L){var T="";return D=D.trim(),(w.tablesHeaderId||w.tableHeaderId)&&(T=' id="'+D.replace(/ /g,"_").toLowerCase()+'"'),D=r.subParser("spanGamut")(D,w,b),"<th"+T+L+">"+D+`</th>
`}function P(D,L){var T=r.subParser("spanGamut")(D,w,b);return"<td"+L+">"+T+`</td>
`}function B(D,L){for(var T=`<table>
<thead>
<tr>
`,V=D.length,H=0;H<V;++H)T+=D[H];for(T+=`</tr>
</thead>
<tbody>
`,H=0;H<L.length;++H){T+=`<tr>
`;for(var q=0;q<V;++q)T+=L[H][q];T+=`</tr>
`}return T+=`</tbody>
</table>
`,T}function W(D){var L,T=D.split(`
`);for(L=0;L<T.length;++L)/^ {0,3}\|/.test(T[L])&&(T[L]=T[L].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(T[L])&&(T[L]=T[L].replace(/\|[ \t]*$/,"")),T[L]=r.subParser("codeSpans")(T[L],w,b);var V=T[0].split("|").map(function(Ee){return Ee.trim()}),H=T[1].split("|").map(function(Ee){return Ee.trim()}),q=[],N=[],J=[],se=[];for(T.shift(),T.shift(),L=0;L<T.length;++L)T[L].trim()!==""&&q.push(T[L].split("|").map(function(Ee){return Ee.trim()}));if(V.length<H.length)return D;for(L=0;L<H.length;++L)J.push(I(H[L]));for(L=0;L<V.length;++L)r.helper.isUndefined(J[L])&&(J[L]=""),N.push(j(V[L],J[L]));for(L=0;L<q.length;++L){for(var z=[],Ce=0;Ce<N.length;++Ce)r.helper.isUndefined(q[L][Ce]),z.push(P(q[L][Ce],J[Ce]));se.push(z)}return B(N,se)}return p=b.converter._dispatch("tables.before",p,w,b),p=p.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),p=p.replace(k,W),p=p.replace(E,W),p=b.converter._dispatch("tables.after",p,w,b),p}),r.subParser("underline",function(p,w,b){return w.underline&&(p=b.converter._dispatch("underline.before",p,w,b),w.literalMidWordUnderscores?(p=p.replace(/\b___(\S[\s\S]*?)___\b/g,function(k,E){return"<u>"+E+"</u>"}),p=p.replace(/\b__(\S[\s\S]*?)__\b/g,function(k,E){return"<u>"+E+"</u>"})):(p=p.replace(/___(\S[\s\S]*?)___/g,function(k,E){return/\S$/.test(E)?"<u>"+E+"</u>":k}),p=p.replace(/__(\S[\s\S]*?)__/g,function(k,E){return/\S$/.test(E)?"<u>"+E+"</u>":k})),p=p.replace(/(_)/g,r.helper.escapeCharactersCallback),p=b.converter._dispatch("underline.after",p,w,b)),p}),r.subParser("unescapeSpecialChars",function(p,w,b){return p=b.converter._dispatch("unescapeSpecialChars.before",p,w,b),p=p.replace(/¨E(\d+)E/g,function(k,E){var I=parseInt(E);return String.fromCharCode(I)}),p=b.converter._dispatch("unescapeSpecialChars.after",p,w,b),p}),r.subParser("makeMarkdown.blockquote",function(p,w){var b="";if(p.hasChildNodes())for(var k=p.childNodes,E=k.length,I=0;I<E;++I){var j=r.subParser("makeMarkdown.node")(k[I],w);j!==""&&(b+=j)}return b=b.trim(),b="> "+b.split(`
`).join(`
> `),b}),r.subParser("makeMarkdown.codeBlock",function(p,w){var b=p.getAttribute("language"),k=p.getAttribute("precodenum");return"```"+b+`
`+w.preList[k]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(p){return"`"+p.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(p,w){var b="";if(p.hasChildNodes()){b+="*";for(var k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);b+="*"}return b}),r.subParser("makeMarkdown.header",function(p,w,b){var k=new Array(b+1).join("#"),E="";if(p.hasChildNodes()){E=k+" ";for(var I=p.childNodes,j=I.length,P=0;P<j;++P)E+=r.subParser("makeMarkdown.node")(I[P],w)}return E}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(p){var w="";return p.hasAttribute("src")&&(w+="+">",p.hasAttribute("width")&&p.hasAttribute("height")&&(w+=" ="+p.getAttribute("width")+"x"+p.getAttribute("height")),p.hasAttribute("title")&&(w+=' "'+p.getAttribute("title")+'"'),w+=")"),w}),r.subParser("makeMarkdown.links",function(p,w){var b="";if(p.hasChildNodes()&&p.hasAttribute("href")){var k=p.childNodes,E=k.length;b="[";for(var I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);b+="](",b+="<"+p.getAttribute("href")+">",p.hasAttribute("title")&&(b+=' "'+p.getAttribute("title")+'"'),b+=")"}return b}),r.subParser("makeMarkdown.list",function(p,w,b){var k="";if(!p.hasChildNodes())return"";for(var E=p.childNodes,I=E.length,j=p.getAttribute("start")||1,P=0;P<I;++P)if(!(typeof E[P].tagName>"u"||E[P].tagName.toLowerCase()!=="li")){var B="";b==="ol"?B=j.toString()+". ":B="- ",k+=B+r.subParser("makeMarkdown.listItem")(E[P],w),++j}return k+=`
<!-- -->
`,k.trim()}),r.subParser("makeMarkdown.listItem",function(p,w){for(var b="",k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);return/\n$/.test(b)?b=b.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):b+=`
`,b}),r.subParser("makeMarkdown.node",function(p,w,b){b=b||!1;var k="";if(p.nodeType===3)return r.subParser("makeMarkdown.txt")(p,w);if(p.nodeType===8)return"<!--"+p.data+`-->
`;if(p.nodeType!==1)return"";var E=p.tagName.toLowerCase();switch(E){case"h1":b||(k=r.subParser("makeMarkdown.header")(p,w,1)+`
`);break;case"h2":b||(k=r.subParser("makeMarkdown.header")(p,w,2)+`
`);break;case"h3":b||(k=r.subParser("makeMarkdown.header")(p,w,3)+`
`);break;case"h4":b||(k=r.subParser("makeMarkdown.header")(p,w,4)+`
`);break;case"h5":b||(k=r.subParser("makeMarkdown.header")(p,w,5)+`
`);break;case"h6":b||(k=r.subParser("makeMarkdown.header")(p,w,6)+`
`);break;case"p":b||(k=r.subParser("makeMarkdown.paragraph")(p,w)+`
`);break;case"blockquote":b||(k=r.subParser("makeMarkdown.blockquote")(p,w)+`
`);break;case"hr":b||(k=r.subParser("makeMarkdown.hr")(p,w)+`
`);break;case"ol":b||(k=r.subParser("makeMarkdown.list")(p,w,"ol")+`
`);break;case"ul":b||(k=r.subParser("makeMarkdown.list")(p,w,"ul")+`
`);break;case"precode":b||(k=r.subParser("makeMarkdown.codeBlock")(p,w)+`
`);break;case"pre":b||(k=r.subParser("makeMarkdown.pre")(p,w)+`
`);break;case"table":b||(k=r.subParser("makeMarkdown.table")(p,w)+`
`);break;case"code":k=r.subParser("makeMarkdown.codeSpan")(p,w);break;case"em":case"i":k=r.subParser("makeMarkdown.emphasis")(p,w);break;case"strong":case"b":k=r.subParser("makeMarkdown.strong")(p,w);break;case"del":k=r.subParser("makeMarkdown.strikethrough")(p,w);break;case"a":k=r.subParser("makeMarkdown.links")(p,w);break;case"img":k=r.subParser("makeMarkdown.image")(p,w);break;default:k=p.outerHTML+`
`}return k}),r.subParser("makeMarkdown.paragraph",function(p,w){var b="";if(p.hasChildNodes())for(var k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);return b=b.trim(),b}),r.subParser("makeMarkdown.pre",function(p,w){var b=p.getAttribute("prenum");return"<pre>"+w.preList[b]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(p,w){var b="";if(p.hasChildNodes()){b+="~~";for(var k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);b+="~~"}return b}),r.subParser("makeMarkdown.strong",function(p,w){var b="";if(p.hasChildNodes()){b+="**";for(var k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w);b+="**"}return b}),r.subParser("makeMarkdown.table",function(p,w){var b="",k=[[],[]],E=p.querySelectorAll("thead>tr>th"),I=p.querySelectorAll("tbody>tr"),j,P;for(j=0;j<E.length;++j){var B=r.subParser("makeMarkdown.tableCell")(E[j],w),W="---";if(E[j].hasAttribute("style")){var D=E[j].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(D){case"text-align:left;":W=":---";break;case"text-align:right;":W="---:";break;case"text-align:center;":W=":---:";break}}k[0][j]=B.trim(),k[1][j]=W}for(j=0;j<I.length;++j){var L=k.push([])-1,T=I[j].getElementsByTagName("td");for(P=0;P<E.length;++P){var V=" ";typeof T[P]<"u"&&(V=r.subParser("makeMarkdown.tableCell")(T[P],w)),k[L].push(V)}}var H=3;for(j=0;j<k.length;++j)for(P=0;P<k[j].length;++P){var q=k[j][P].length;q>H&&(H=q)}for(j=0;j<k.length;++j){for(P=0;P<k[j].length;++P)j===1?k[j][P].slice(-1)===":"?k[j][P]=r.helper.padEnd(k[j][P].slice(-1),H-1,"-")+":":k[j][P]=r.helper.padEnd(k[j][P],H,"-"):k[j][P]=r.helper.padEnd(k[j][P],H);b+="| "+k[j].join(" | ")+` |
`}return b.trim()}),r.subParser("makeMarkdown.tableCell",function(p,w){var b="";if(!p.hasChildNodes())return"";for(var k=p.childNodes,E=k.length,I=0;I<E;++I)b+=r.subParser("makeMarkdown.node")(k[I],w,!0);return b.trim()}),r.subParser("makeMarkdown.txt",function(p){var w=p.nodeValue;return w=w.replace(/ +/g," "),w=w.replace(/¨NBSP;/g," "),w=r.helper.unescapeHTMLEntities(w),w=w.replace(/([*_~|`])/g,"\\$1"),w=w.replace(/^(\s*)>/g,"\\$1>"),w=w.replace(/^#/gm,"\\#"),w=w.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),w=w.replace(/^( {0,3}\d+)\./gm,"$1\\."),w=w.replace(/^( {0,3})([+-])/gm,"$1\\$2"),w=w.replace(/]([\s]*)\(/g,"\\]$1\\("),w=w.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),w});var C=this;e.exports?e.exports=r:C.showdown=r}).call(xr)})(RI);var Kae=RI.exports,o0={};Object.defineProperty(o0,"__esModule",{value:!0});o0.useStyles=void 0;var Yae=EI;o0.useStyles=Yae.createUseStyles(function(e){return{yamde:{margin:"16px 0",width:"100%",boxSizing:"initial","@media screen and (max-width: 767px)":{overflow:"hidden"}},toolbar:{display:"flex",marginBottom:"-1px",maxHeight:"36px",width:"100%"},buttons:{display:"flex","@media screen and (max-width: 767px)":{display:"none"}},mobileButton:{display:"none","@media screen and (max-width: 767px)":{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(34px, 1fr))",marginTop:"-1px"}},viewSwitch:{marginLeft:"auto",display:"flex",marginTop:"-1px"},viewButton:{cursor:"pointer",fontSize:"14px",backgroundColor:e.switchButtonBackgroundColor,display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid "+e.switchButtonBorderColor,transition:"background-color 0.2s ease",fontWeight:400,padding:"0 10px",width:"65px",height:"35px",color:e.switchButtonColorView,zIndex:1,fontFamily:"Helvetica, Arial, sans-serif","&:first-child":{borderRight:0},"&:hover":{color:e.switchButtonColorHover,backgroundColor:e.switchButtonBackgroundColorHover,transition:"background-color 0.2s ease"}},activeView:{borderBottom:"1px solid "+e.switchButtonBorderColorActiveView,color:e.switchButtonColorActiveView,backgroundColor:e.switchButtonBackgroundColorActiveView,"&:hover":{backgroundColor:e.switchButtonBackgroundColorActiveView}},contentArea:{marginTop:"-1px",display:"flex","& > textarea":{borderRadius:0,border:"1px solid "+e.textAreaBorderColor,width:"calc(100% - 34px)",padding:"16px",resize:"none",background:e.contentAreaBackgroundColor,color:e.textColor,"&::selection":{backgroundColor:e.textAreaSelectionBackgroundColor,color:e.textAreaSelectionColor},"&:active, &:focus":{border:"1px solid "+e.textAreaBorderColor,outline:"none"}}},preview:{background:e.contentAreaBackgroundColor,border:"1px solid "+e.previewAreaBorderColor,width:"calc(100% - 34px)",padding:"16px",minHeight:"50px",fontSize:"1rem",fontWeight:400,fontFamily:"Helvetica, Arial, sans-serif","& > p":{color:e.textColor+" !important",fontFamily:"inherit",textAlign:"left",fontSize:"16px",fontWeight:400,marginBottom:"1rem",marginTop:0,"& > img":{maxWidth:"100%"}},"& code":{fontFamily:'source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace',fontSize:"12px",background:e.codeBlockBackgroundColor,padding:"4px 8px"},"& pre":{width:"auto",background:e.codeBlockBackgroundColor,padding:"4px 8px"},"& > h1, & > h2, & > h3, & > h4, & > h5, & > h6":{color:e.textColor+" !important",fontFamily:"inherit",textAlign:"left"},"& a":{textDecoration:"underline !important",fontFamily:"inherit",color:e.linkColor+" !important"},"& > blockquote":{padding:"8px 24px",lineHeight:"1em",marginBlockStart:"1em",marginBlockEnd:"1em",marginInlineStart:0,marginInlineEnd:0,fontStyle:"italic",borderLeft:"5px solid "+e.quoteAdornmentColor,fontSize:"1.15em","& > p":{color:e.textColor+" !important"}},"& > table":{borderCollapse:"collapse","& th, & td":{border:"1px solid "+e.tableBorderColor,padding:"4px",color:e.textColor}},"& ul, & ol, & li":{color:e.textColor}},button:{cursor:"pointer",backgroundColor:e.buttonBackgroundColor,fontSize:"13px",fontFamily:"Courier, Helvetica, Arial, sans-serif",fontWeight:400,width:"34px",height:"34px",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid "+e.buttonBorderColor,transition:"background-color 0.2s ease",marginRight:"-1px",color:e.buttonColor,"&:hover":{backgroundColor:e.buttonBackgroundColorHover,transition:"background-color 0.2s ease"},"& > svg":{width:"16px",height:"16px"}}}});var a0={},F2={exports:{}},s0={},PI={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(PI);var ar=PI.exports,AI={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(AI);var tr=AI.exports,M1={exports:{}},$1={exports:{}},L1={exports:{}},F1={exports:{}},E5;function Xae(){return E5||(E5=1,function(e){var t=tr.default;function n(r,i){if(t(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var a=o.call(r,i||"default");if(t(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(F1)),F1.exports}var R5;function Qae(){return R5||(R5=1,function(e){var t=tr.default,n=Xae();function r(i){var o=n(i,"string");return t(o)==="symbol"?o:String(o)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(L1)),L1.exports}var P5;function II(){return P5||(P5=1,function(e){var t=Qae();function n(r,i,o){return i=t(i),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}($1)),$1.exports}var A5;function Jr(){return A5||(A5=1,function(e){var t=II();function n(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),a.push.apply(a,s)}return a}function r(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?n(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(M1)),M1.exports}var sp={},I5;function Jae(){if(I5)return sp;I5=1,Object.defineProperty(sp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"}}]},name:"bold",theme:"outlined"};return sp.default=e,sp}var iu={},z1={exports:{}},B1={exports:{}},T5;function Zae(){return T5||(T5=1,function(e){function t(n){if(Array.isArray(n))return n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(B1)),B1.exports}var H1={exports:{}},O5;function ese(){return O5||(O5=1,function(e){function t(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,u,l=[],d=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(o=s.call(i)).done)&&(l.push(o.value),l.length!==r);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(f)throw a}}return l}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(H1)),H1.exports}var U1={exports:{}},W1={exports:{}},D5;function tse(){return D5||(D5=1,function(e){function t(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=n[i];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(W1)),W1.exports}var N5;function nse(){return N5||(N5=1,function(e){var t=tse();function n(r,i){if(r){if(typeof r=="string")return t(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return t(r,i)}}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(U1)),U1.exports}var V1={exports:{}},M5;function rse(){return M5||(M5=1,function(e){function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(V1)),V1.exports}var $5;function TI(){return $5||($5=1,function(e){var t=Zae(),n=ese(),r=nse(),i=rse();function o(a,s){return t(a)||n(a,s)||r(a,s)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}(z1)),z1.exports}var q1={exports:{}},G1={exports:{}},L5;function ise(){return L5||(L5=1,function(e){function t(n,r){if(n==null)return{};var i={},o=Object.keys(n),a,s;for(s=0;s<o.length;s++)a=o[s],!(r.indexOf(a)>=0)&&(i[a]=n[a]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(G1)),G1.exports}var F5;function OI(){return F5||(F5=1,function(e){var t=ise();function n(r,i){if(r==null)return{};var o=t(r,i),a,s;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(s=0;s<u.length;s++)a=u[s],!(i.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(o[a]=r[a])}return o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(q1)),q1.exports}var K1={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/var z5;function ose(){return z5||(z5=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var u in o)t.call(o,u)&&o[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(K1)),K1.exports}var ou={},B5;function DI(){if(B5)return ou;B5=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.default=void 0;var e=h,t=(0,e.createContext)({}),n=t;return ou.default=n,ou}var au={},Xn={};function fi(e,t){ase(e)&&(e="100%");var n=sse(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ase(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function sse(e){return typeof e=="string"&&e.indexOf("%")!==-1}function lse(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function lp(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Y1(e){return e.length===1?"0"+e:String(e)}function cse(e,t,n){return{r:fi(e,255)*255,g:fi(t,255)*255,b:fi(n,255)*255}}function X1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function use(e,t,n){var r,i,o;if(e=fi(e,360),t=fi(t,100),n=fi(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=X1(s,a,e+1/3),i=X1(s,a,e),o=X1(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function dse(e,t,n){e=fi(e,255),t=fi(t,255),n=fi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,u=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:u,v:a}}function fse(e,t,n){e=fi(e,360)*6,t=fi(t,100),n=fi(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,a,o,o,s,n][u],d=[s,n,n,a,o,o][u],f=[o,o,s,n,n,a][u];return{r:l*255,g:d*255,b:f*255}}function pse(e,t,n,r){var i=[Y1(Math.round(e).toString(16)),Y1(Math.round(t).toString(16)),Y1(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function H5(e){return Tr(e)/255}function Tr(e){return parseInt(e,16)}var U5={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function su(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=gse(e)),typeof e=="object"&&(yo(e.r)&&yo(e.g)&&yo(e.b)?(t=cse(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):yo(e.h)&&yo(e.s)&&yo(e.v)?(r=lp(e.s),i=lp(e.v),t=fse(e.h,r,i),a=!0,s="hsv"):yo(e.h)&&yo(e.s)&&yo(e.l)&&(r=lp(e.s),o=lp(e.l),t=use(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=lse(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var hse="[-\\+]?\\d+%?",mse="[-\\+]?\\d*\\.\\d+%?",da="(?:".concat(mse,")|(?:").concat(hse,")"),Q1="[\\s|\\(]+(".concat(da,")[,|\\s]+(").concat(da,")[,|\\s]+(").concat(da,")\\s*\\)?"),J1="[\\s|\\(]+(".concat(da,")[,|\\s]+(").concat(da,")[,|\\s]+(").concat(da,")[,|\\s]+(").concat(da,")\\s*\\)?"),Pi={CSS_UNIT:new RegExp(da),rgb:new RegExp("rgb"+Q1),rgba:new RegExp("rgba"+J1),hsl:new RegExp("hsl"+Q1),hsla:new RegExp("hsla"+J1),hsv:new RegExp("hsv"+Q1),hsva:new RegExp("hsva"+J1),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function gse(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(U5[e])e=U5[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Pi.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Pi.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Pi.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Pi.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Pi.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Pi.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Pi.hex8.exec(e),n?{r:Tr(n[1]),g:Tr(n[2]),b:Tr(n[3]),a:H5(n[4]),format:t?"name":"hex8"}:(n=Pi.hex6.exec(e),n?{r:Tr(n[1]),g:Tr(n[2]),b:Tr(n[3]),format:t?"name":"hex"}:(n=Pi.hex4.exec(e),n?{r:Tr(n[1]+n[1]),g:Tr(n[2]+n[2]),b:Tr(n[3]+n[3]),a:H5(n[4]+n[4]),format:t?"name":"hex8"}:(n=Pi.hex3.exec(e),n?{r:Tr(n[1]+n[1]),g:Tr(n[2]+n[2]),b:Tr(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function yo(e){return!!Pi.CSS_UNIT.exec(String(e))}var cp=2,W5=.16,vse=.05,yse=.05,bse=.15,NI=5,MI=4,wse=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function V5(e){var t=e.r,n=e.g,r=e.b,i=dse(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function up(e){var t=e.r,n=e.g,r=e.b;return"#".concat(pse(t,n,r,!1))}function xse(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function q5(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-cp*t:Math.round(e.h)+cp*t:r=n?Math.round(e.h)+cp*t:Math.round(e.h)-cp*t,r<0?r+=360:r>=360&&(r-=360),r}function G5(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-W5*t:t===MI?r=e.s+W5:r=e.s+vse*t,r>1&&(r=1),n&&t===NI&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function K5(e,t,n){var r;return n?r=e.v+yse*t:r=e.v-bse*t,r>1&&(r=1),Number(r.toFixed(2))}function z2(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=su(e),i=NI;i>0;i-=1){var o=V5(r),a=up(su({h:q5(o,i,!0),s:G5(o,i,!0),v:K5(o,i,!0)}));n.push(a)}n.push(up(r));for(var s=1;s<=MI;s+=1){var u=V5(r),l=up(su({h:q5(u,s),s:G5(u,s),v:K5(u,s)}));n.push(l)}return t.theme==="dark"?wse.map(function(d){var f=d.index,m=d.opacity,g=up(xse(su(t.backgroundColor||"#141414"),su(n[f]),m*100));return g}):n}var ih={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Tn={},oh={};Object.keys(ih).forEach(function(e){Tn[e]=z2(ih[e]),Tn[e].primary=Tn[e][5],oh[e]=z2(ih[e],{theme:"dark",backgroundColor:"#141414"}),oh[e].primary=oh[e][5]});var Sse=Tn.red,Cse=Tn.volcano,_se=Tn.gold,kse=Tn.orange,jse=Tn.yellow,Ese=Tn.lime,Rse=Tn.green,Pse=Tn.cyan,Ase=Tn.blue,Ise=Tn.geekblue,Tse=Tn.purple,Ose=Tn.magenta,Dse=Tn.grey;const Nse=Object.freeze(Object.defineProperty({__proto__:null,blue:Ase,cyan:Pse,geekblue:Ise,generate:z2,gold:_se,green:Rse,grey:Dse,lime:Ese,magenta:Ose,orange:kse,presetDarkPalettes:oh,presetPalettes:Tn,presetPrimaryColors:ih,purple:Tse,red:Sse,volcano:Cse,yellow:jse},Symbol.toStringTag,{value:"Module"})),Mse=qk(Nse);var Pr={},Y5;function $se(){if(Y5)return Pr;Y5=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.call=o,Pr.default=void 0,Pr.note=r,Pr.noteOnce=s,Pr.preMessage=void 0,Pr.resetWarned=i,Pr.warning=n,Pr.warningOnce=a;var e={},t=function(d){};Pr.preMessage=t;function n(l,d){}function r(l,d){}function i(){e={}}function o(l,d,f){!d&&!e[f]&&(l(!1,f),e[f]=!0)}function a(l,d){o(n,l,d)}function s(l,d){o(r,l,d)}a.preMessage=t,a.resetWarned=i,a.noteOnce=s;var u=a;return Pr.default=u,Pr}var Qa={},dp={},X5;function Lse(){if(X5)return dp;X5=1,Object.defineProperty(dp,"__esModule",{value:!0}),dp.default=e;function e(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}return dp}var fp={},Q5;function Fse(){if(Q5)return fp;Q5=1,Object.defineProperty(fp,"__esModule",{value:!0}),fp.default=e;function e(t,n){if(!t)return!1;if(t.contains)return t.contains(n);for(var r=n;r;){if(r===t)return!0;r=r.parentNode}return!1}return fp}var J5;function zse(){if(J5)return Qa;J5=1;var e=ar.default;Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.clearContainerCache=v,Qa.injectCSS=f,Qa.removeCSS=g,Qa.updateCSS=_;var t=e(Lse()),n=e(Fse()),r="data-rc-order",i="data-rc-priority",o="rc-util-key",a=new Map;function s(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=x.mark;return S?S.startsWith("data-")?S:"data-".concat(S):o}function u(x){if(x.attachTo)return x.attachTo;var S=document.querySelector("head");return S||document.body}function l(x){return x==="queue"?"prependQueue":x?"prepend":"append"}function d(x){return Array.from((a.get(x)||x).children).filter(function(S){return S.tagName==="STYLE"})}function f(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,t.default)())return null;var C=S.csp,p=S.prepend,w=S.priority,b=w===void 0?0:w,k=l(p),E=k==="prependQueue",I=document.createElement("style");I.setAttribute(r,k),E&&b&&I.setAttribute(i,"".concat(b)),C!=null&&C.nonce&&(I.nonce=C==null?void 0:C.nonce),I.innerHTML=x;var j=u(S),P=j.firstChild;if(p){if(E){var B=d(j).filter(function(W){if(!["prepend","prependQueue"].includes(W.getAttribute(r)))return!1;var D=Number(W.getAttribute(i)||0);return b>=D});if(B.length)return j.insertBefore(I,B[B.length-1].nextSibling),I}j.insertBefore(I,P)}else j.appendChild(I);return I}function m(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=u(S);return d(C).find(function(p){return p.getAttribute(s(S))===x})}function g(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=m(x,S);if(C){var p=u(S);p.removeChild(C)}}function y(x,S){var C=a.get(x);if(!C||!(0,n.default)(document,C)){var p=f("",S),w=p.parentNode;a.set(x,w),x.removeChild(p)}}function v(){a.clear()}function _(x,S){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=u(C);y(p,C);var w=m(S,C);if(w){var b,k;if((b=C.csp)!==null&&b!==void 0&&b.nonce&&w.nonce!==((k=C.csp)===null||k===void 0?void 0:k.nonce)){var E;w.nonce=(E=C.csp)===null||E===void 0?void 0:E.nonce}return w.innerHTML!==x&&(w.innerHTML=x),w}var I=f(x,C);return I.setAttribute(s(C),S),I}return Qa}var Z5;function X3(){if(Z5)return Xn;Z5=1;var e=ar,t=tr;Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.generate=y,Xn.getSecondaryColor=v,Xn.iconStyles=void 0,Xn.isIconDefinition=m,Xn.normalizeAttrs=g,Xn.normalizeTwoToneColors=_,Xn.useInsertStyles=Xn.svgBaseProps=void 0,Xn.warning=f;var n=e(Jr()),r=e(tr),i=Mse,o=d(h),a=e($se()),s=zse(),u=e(DI());function l(p){if(typeof WeakMap!="function")return null;var w=new WeakMap,b=new WeakMap;return(l=function(E){return E?b:w})(p)}function d(p,w){if(!w&&p&&p.__esModule)return p;if(p===null||t(p)!=="object"&&typeof p!="function")return{default:p};var b=l(w);if(b&&b.has(p))return b.get(p);var k={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var I in p)if(I!=="default"&&Object.prototype.hasOwnProperty.call(p,I)){var j=E?Object.getOwnPropertyDescriptor(p,I):null;j&&(j.get||j.set)?Object.defineProperty(k,I,j):k[I]=p[I]}return k.default=p,b&&b.set(p,k),k}function f(p,w){(0,a.default)(p,"[@ant-design/icons] ".concat(w))}function m(p){return(0,r.default)(p)==="object"&&typeof p.name=="string"&&typeof p.theme=="string"&&((0,r.default)(p.icon)==="object"||typeof p.icon=="function")}function g(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(p).reduce(function(w,b){var k=p[b];switch(b){case"class":w.className=k,delete w.class;break;default:w[b]=k}return w},{})}function y(p,w,b){return b?o.default.createElement(p.tag,(0,n.default)((0,n.default)({key:w},g(p.attrs)),b),(p.children||[]).map(function(k,E){return y(k,"".concat(w,"-").concat(p.tag,"-").concat(E))})):o.default.createElement(p.tag,(0,n.default)({key:w},g(p.attrs)),(p.children||[]).map(function(k,E){return y(k,"".concat(w,"-").concat(p.tag,"-").concat(E))}))}function v(p){return(0,i.generate)(p)[0]}function _(p){return p?Array.isArray(p)?p:[p]:[]}var x={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"};Xn.svgBaseProps=x;var S=`
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`;Xn.iconStyles=S;var C=function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S,b=(0,o.useContext)(u.default),k=b.csp;(0,o.useEffect)(function(){(0,s.updateCSS)(w,"@ant-design-icons",{prepend:!0,csp:k})},[])};return Xn.useInsertStyles=C,Xn}var e_;function $I(){if(e_)return au;e_=1;var e=ar;Object.defineProperty(au,"__esModule",{value:!0}),au.default=void 0;var t=e(OI()),n=e(Jr()),r=X3(),i=["icon","className","onClick","style","primaryColor","secondaryColor"],o={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function a(d){var f=d.primaryColor,m=d.secondaryColor;o.primaryColor=f,o.secondaryColor=m||(0,r.getSecondaryColor)(f),o.calculated=!!m}function s(){return(0,n.default)({},o)}var u=function(f){var m=f.icon,g=f.className,y=f.onClick,v=f.style,_=f.primaryColor,x=f.secondaryColor,S=(0,t.default)(f,i),C=o;if(_&&(C={primaryColor:_,secondaryColor:x||(0,r.getSecondaryColor)(_)}),(0,r.useInsertStyles)(),(0,r.warning)((0,r.isIconDefinition)(m),"icon should be icon definiton, but got ".concat(m)),!(0,r.isIconDefinition)(m))return null;var p=m;return p&&typeof p.icon=="function"&&(p=(0,n.default)((0,n.default)({},p),{},{icon:p.icon(C.primaryColor,C.secondaryColor)})),(0,r.generate)(p.icon,"svg-".concat(p.name),(0,n.default)({className:g,onClick:y,style:v,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},S))};u.displayName="IconReact",u.getTwoToneColors=s,u.setTwoToneColors=a;var l=u;return au.default=l,au}var lu={},t_;function Bse(){if(t_)return lu;t_=1;var e=ar;Object.defineProperty(lu,"__esModule",{value:!0}),lu.getTwoToneColor=o,lu.setTwoToneColor=i;var t=e(TI()),n=e($I()),r=X3();function i(a){var s=(0,r.normalizeTwoToneColors)(a),u=(0,t.default)(s,2),l=u[0],d=u[1];return n.default.setTwoToneColors({primaryColor:l,secondaryColor:d})}function o(){var a=n.default.getTwoToneColors();return a.calculated?[a.primaryColor,a.secondaryColor]:a.primaryColor}return lu}var n_;function uo(){if(n_)return iu;n_=1;var e=ar,t=tr;Object.defineProperty(iu,"__esModule",{value:!0}),iu.default=void 0;var n=e(Jr()),r=e(TI()),i=e(II()),o=e(OI()),a=y(h),s=e(ose()),u=e(DI()),l=e($I()),d=Bse(),f=X3(),m=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];function g(x){if(typeof WeakMap!="function")return null;var S=new WeakMap,C=new WeakMap;return(g=function(w){return w?C:S})(x)}function y(x,S){if(!S&&x&&x.__esModule)return x;if(x===null||t(x)!=="object"&&typeof x!="function")return{default:x};var C=g(S);if(C&&C.has(x))return C.get(x);var p={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in x)if(b!=="default"&&Object.prototype.hasOwnProperty.call(x,b)){var k=w?Object.getOwnPropertyDescriptor(x,b):null;k&&(k.get||k.set)?Object.defineProperty(p,b,k):p[b]=x[b]}return p.default=x,C&&C.set(x,p),p}(0,d.setTwoToneColor)("#1890ff");var v=a.forwardRef(function(x,S){var C,p=x.className,w=x.icon,b=x.spin,k=x.rotate,E=x.tabIndex,I=x.onClick,j=x.twoToneColor,P=(0,o.default)(x,m),B=a.useContext(u.default),W=B.prefixCls,D=W===void 0?"anticon":W,L=B.rootClassName,T=(0,s.default)(L,D,(C={},(0,i.default)(C,"".concat(D,"-").concat(w.name),!!w.name),(0,i.default)(C,"".concat(D,"-spin"),!!b||w.name==="loading"),C),p),V=E;V===void 0&&I&&(V=-1);var H=k?{msTransform:"rotate(".concat(k,"deg)"),transform:"rotate(".concat(k,"deg)")}:void 0,q=(0,f.normalizeTwoToneColors)(j),N=(0,r.default)(q,2),J=N[0],se=N[1];return a.createElement("span",(0,n.default)((0,n.default)({role:"img","aria-label":w.name},P),{},{ref:S,tabIndex:V,onClick:I,className:T}),a.createElement(l.default,{icon:w,primaryColor:J,secondaryColor:se,style:H}))});v.displayName="AntdIcon",v.getTwoToneColor=d.getTwoToneColor,v.setTwoToneColor=d.setTwoToneColor;var _=v;return iu.default=_,iu}var Q3=ar,Hse=tr;Object.defineProperty(s0,"__esModule",{value:!0});s0.default=void 0;var r_=Q3(Jr()),LI=Vse(h),Use=Q3(Jae()),Wse=Q3(uo());function FI(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(FI=function(i){return i?n:t})(e)}function Vse(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Hse(e)!=="object"&&typeof e!="function")return{default:e};var n=FI(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var zI=function(t,n){return LI.createElement(Wse.default,(0,r_.default)((0,r_.default)({},t),{},{ref:n,icon:Use.default}))};zI.displayName="BoldOutlined";var qse=LI.forwardRef(zI);s0.default=qse;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(s0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(F2,F2.exports);var Gse=F2.exports,B2={exports:{}},l0={},pp={},i_;function Kse(){if(i_)return pp;i_=1,Object.defineProperty(pp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"italic",theme:"outlined"};return pp.default=e,pp}var J3=ar,Yse=tr;Object.defineProperty(l0,"__esModule",{value:!0});l0.default=void 0;var o_=J3(Jr()),BI=Jse(h),Xse=J3(Kse()),Qse=J3(uo());function HI(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(HI=function(i){return i?n:t})(e)}function Jse(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Yse(e)!=="object"&&typeof e!="function")return{default:e};var n=HI(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var UI=function(t,n){return BI.createElement(Qse.default,(0,o_.default)((0,o_.default)({},t),{},{ref:n,icon:Xse.default}))};UI.displayName="ItalicOutlined";var Zse=BI.forwardRef(UI);l0.default=Zse;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(l0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(B2,B2.exports);var ele=B2.exports,H2={exports:{}},c0={},hp={},a_;function tle(){if(a_)return hp;a_=1,Object.defineProperty(hp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 474H569.9c-10-2-20.5-4-31.6-6-15.9-2.9-22.2-4.1-30.8-5.8-51.3-10-82.2-20-106.8-34.2-35.1-20.5-52.2-48.3-52.2-85.1 0-37 15.2-67.7 44-89 28.4-21 68.8-32.1 116.8-32.1 54.8 0 97.1 14.4 125.8 42.8 14.6 14.4 25.3 32.1 31.8 52.6 1.3 4.1 2.8 10 4.3 17.8.9 4.8 5.2 8.2 9.9 8.2h72.8c5.6 0 10.1-4.6 10.1-10.1v-1c-.7-6.8-1.3-12.1-2-16-7.3-43.5-28-81.7-59.7-110.3-44.4-40.5-109.7-61.8-188.7-61.8-72.3 0-137.4 18.1-183.3 50.9-25.6 18.4-45.4 41.2-58.6 67.7-13.5 27.1-20.3 58.4-20.3 92.9 0 29.5 5.7 54.5 17.3 76.5 8.3 15.7 19.6 29.5 34.1 42H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h433.2c2.1.4 3.9.8 5.9 1.2 30.9 6.2 49.5 10.4 66.6 15.2 23 6.5 40.6 13.3 55.2 21.5 35.8 20.2 53.3 49.2 53.3 89 0 35.3-15.5 66.8-43.6 88.8-30.5 23.9-75.6 36.4-130.5 36.4-43.7 0-80.7-8.5-110.2-25-29.1-16.3-49.1-39.8-59.7-69.5-.8-2.2-1.7-5.2-2.7-9-1.2-4.4-5.3-7.5-9.7-7.5h-79.7c-5.6 0-10.1 4.6-10.1 10.1v1c.2 2.3.4 4.2.6 5.7 6.5 48.8 30.3 88.8 70.7 118.8 47.1 34.8 113.4 53.2 191.8 53.2 84.2 0 154.8-19.8 204.2-57.3 25-18.9 44.2-42.2 57.1-69 13-27.1 19.7-57.9 19.7-91.5 0-31.8-5.8-58.4-17.8-81.4-5.8-11.2-13.1-21.5-21.8-30.8H952c4.4 0 8-3.6 8-8v-60a8 8 0 00-8-7.9z"}}]},name:"strikethrough",theme:"outlined"};return hp.default=e,hp}var Z3=ar,nle=tr;Object.defineProperty(c0,"__esModule",{value:!0});c0.default=void 0;var s_=Z3(Jr()),WI=ole(h),rle=Z3(tle()),ile=Z3(uo());function VI(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(VI=function(i){return i?n:t})(e)}function ole(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||nle(e)!=="object"&&typeof e!="function")return{default:e};var n=VI(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var qI=function(t,n){return WI.createElement(ile.default,(0,s_.default)((0,s_.default)({},t),{},{ref:n,icon:rle.default}))};qI.displayName="StrikethroughOutlined";var ale=WI.forwardRef(qI);c0.default=ale;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(c0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(H2,H2.exports);var sle=H2.exports,U2={exports:{}},u0={},mp={},l_;function lle(){if(l_)return mp;l_=1,Object.defineProperty(mp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"};return mp.default=e,mp}var e4=ar,cle=tr;Object.defineProperty(u0,"__esModule",{value:!0});u0.default=void 0;var c_=e4(Jr()),GI=fle(h),ule=e4(lle()),dle=e4(uo());function KI(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(KI=function(i){return i?n:t})(e)}function fle(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||cle(e)!=="object"&&typeof e!="function")return{default:e};var n=KI(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var YI=function(t,n){return GI.createElement(dle.default,(0,c_.default)((0,c_.default)({},t),{},{ref:n,icon:ule.default}))};YI.displayName="UnorderedListOutlined";var ple=GI.forwardRef(YI);u0.default=ple;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(u0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(U2,U2.exports);var hle=U2.exports,W2={exports:{}},d0={},gp={},u_;function mle(){if(u_)return gp;u_=1,Object.defineProperty(gp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M920 760H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-568H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM216 712H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h72.4v20.5h-35.7c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h35.7V838H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4V716c0-2.2-1.8-4-4-4zM100 188h38v120c0 2.2 1.8 4 4 4h40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 00-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 002.1-5.4V432c0-2.2-1.8-4-4-4z"}}]},name:"ordered-list",theme:"outlined"};return gp.default=e,gp}var t4=ar,gle=tr;Object.defineProperty(d0,"__esModule",{value:!0});d0.default=void 0;var d_=t4(Jr()),XI=ble(h),vle=t4(mle()),yle=t4(uo());function QI(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(QI=function(i){return i?n:t})(e)}function ble(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||gle(e)!=="object"&&typeof e!="function")return{default:e};var n=QI(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var JI=function(t,n){return XI.createElement(yle.default,(0,d_.default)((0,d_.default)({},t),{},{ref:n,icon:vle.default}))};JI.displayName="OrderedListOutlined";var wle=XI.forwardRef(JI);d0.default=wle;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(d0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(W2,W2.exports);var xle=W2.exports,V2={exports:{}},f0={},vp={},f_;function Sle(){if(f_)return vp;f_=1,Object.defineProperty(vp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"}}]},name:"table",theme:"outlined"};return vp.default=e,vp}var n4=ar,Cle=tr;Object.defineProperty(f0,"__esModule",{value:!0});f0.default=void 0;var p_=n4(Jr()),ZI=jle(h),_le=n4(Sle()),kle=n4(uo());function eT(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(eT=function(i){return i?n:t})(e)}function jle(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Cle(e)!=="object"&&typeof e!="function")return{default:e};var n=eT(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var tT=function(t,n){return ZI.createElement(kle.default,(0,p_.default)((0,p_.default)({},t),{},{ref:n,icon:_le.default}))};tT.displayName="TableOutlined";var Ele=ZI.forwardRef(tT);f0.default=Ele;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(f0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(V2,V2.exports);var Rle=V2.exports,q2={exports:{}},p0={},yp={},h_;function Ple(){if(h_)return yp;h_=1,Object.defineProperty(yp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};return yp.default=e,yp}var r4=ar,Ale=tr;Object.defineProperty(p0,"__esModule",{value:!0});p0.default=void 0;var m_=r4(Jr()),nT=Ole(h),Ile=r4(Ple()),Tle=r4(uo());function rT(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(rT=function(i){return i?n:t})(e)}function Ole(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Ale(e)!=="object"&&typeof e!="function")return{default:e};var n=rT(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var iT=function(t,n){return nT.createElement(Tle.default,(0,m_.default)((0,m_.default)({},t),{},{ref:n,icon:Ile.default}))};iT.displayName="FileImageOutlined";var Dle=nT.forwardRef(iT);p0.default=Dle;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(p0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(q2,q2.exports);var Nle=q2.exports,G2={exports:{}},h0={},bp={},g_;function Mle(){if(g_)return bp;g_=1,Object.defineProperty(bp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};return bp.default=e,bp}var i4=ar,$le=tr;Object.defineProperty(h0,"__esModule",{value:!0});h0.default=void 0;var v_=i4(Jr()),oT=zle(h),Lle=i4(Mle()),Fle=i4(uo());function aT(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(aT=function(i){return i?n:t})(e)}function zle(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||$le(e)!=="object"&&typeof e!="function")return{default:e};var n=aT(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var sT=function(t,n){return oT.createElement(Fle.default,(0,v_.default)((0,v_.default)({},t),{},{ref:n,icon:Lle.default}))};sT.displayName="LinkOutlined";var Ble=oT.forwardRef(sT);h0.default=Ble;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(h0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(G2,G2.exports);var Hle=G2.exports,K2={exports:{}},m0={},wp={},y_;function Ule(){if(y_)return wp;y_=1,Object.defineProperty(wp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};return wp.default=e,wp}var o4=ar,Wle=tr;Object.defineProperty(m0,"__esModule",{value:!0});m0.default=void 0;var b_=o4(Jr()),lT=Gle(h),Vle=o4(Ule()),qle=o4(uo());function cT(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(cT=function(i){return i?n:t})(e)}function Gle(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Wle(e)!=="object"&&typeof e!="function")return{default:e};var n=cT(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var uT=function(t,n){return lT.createElement(qle.default,(0,b_.default)((0,b_.default)({},t),{},{ref:n,icon:Vle.default}))};uT.displayName="RightOutlined";var Kle=lT.forwardRef(uT);m0.default=Kle;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(m0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(K2,K2.exports);var Yle=K2.exports,Y2={exports:{}},g0={},xp={},w_;function Xle(){if(w_)return xp;w_=1,Object.defineProperty(xp,"__esModule",{value:!0});var e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};return xp.default=e,xp}var a4=ar,Qle=tr;Object.defineProperty(g0,"__esModule",{value:!0});g0.default=void 0;var x_=a4(Jr()),dT=ece(h),Jle=a4(Xle()),Zle=a4(uo());function fT(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(fT=function(i){return i?n:t})(e)}function ece(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Qle(e)!=="object"&&typeof e!="function")return{default:e};var n=fT(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var pT=function(t,n){return dT.createElement(Zle.default,(0,x_.default)((0,x_.default)({},t),{},{ref:n,icon:Jle.default}))};pT.displayName="CodeOutlined";var tce=dT.forwardRef(pT);g0.default=tce;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(g0);function r(o){return o&&o.__esModule?o:{default:o}}var i=n;t.default=i,e.exports=i})(Y2,Y2.exports);var nce=Y2.exports,Vi=xr&&xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a0,"__esModule",{value:!0});a0.toolbarActions=void 0;var Yi=Vi(h),rce=Vi(Gse),ice=Vi(ele),oce=Vi(sle),ace=Vi(hle),sce=Vi(xle),lce=Vi(Rle),cce=Vi(Nle),uce=Vi(Hle),dce=Vi(Yle),fce=Vi(nce);a0.toolbarActions=[{name:"bold",icon:Yi.default.createElement(rce.default,null),schema:{openingTag:"**",closingTag:"**"}},{name:"italic",icon:Yi.default.createElement(ice.default,null),schema:{openingTag:"*",closingTag:"*"}},{name:"strikethrough",icon:Yi.default.createElement(oce.default,null),schema:{openingTag:"~~",closingTag:"~~"}},{name:"heading1",icon:"H1",schema:{openingTag:"# ",closingTag:""}},{name:"heading2",icon:"H2",schema:{openingTag:"## ",closingTag:""}},{name:"heading3",icon:"H3",schema:{openingTag:"### ",closingTag:""}},{name:"ulist",icon:Yi.default.createElement(ace.default,null),schema:{openingTag:"- ",closingTag:""}},{name:"olist",icon:Yi.default.createElement(sce.default,null),schema:{openingTag:"1. ",closingTag:""}},{name:"table",icon:Yi.default.createElement(lce.default,null),schema:{openingTag:`Column 1 | Column 2 | Column 3
---|:---:|---:
Left | Center | Right
1 | 2 | 3
4 | 5 | 6`,closingTag:""}},{name:"image",icon:Yi.default.createElement(cce.default,null),schema:{openingTag:""}},{name:"link",icon:Yi.default.createElement(uce.default,null),schema:{openingTag:"[",closingTag:"](https://www.example.com)"}},{name:"quote",icon:Yi.default.createElement(dce.default,null),schema:{openingTag:"> ",closingTag:""}},{name:"code",icon:Yi.default.createElement(fce.default,null),schema:{openingTag:"`",closingTag:"`"}},{name:"hr",icon:"HR",schema:{openingTag:"",closingTag:`
---
`}}];var pce=xr&&xr.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),hce=xr&&xr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mce=xr&&xr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&pce(t,e,n);return hce(t,e),t},gce=xr&&xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y3,"__esModule",{value:!0});var pr=mce(h),vce=gce(Kae),yce=o0,S_=a0,bce=new vce.default.Converter({tables:!0,simplifiedAutoLink:!1,strikethrough:!0,tasklists:!0,noHeaderId:!0}),wce=function(e){var t=e.value,n=e.handler,r=e.toolbar,i=e.required,o=i===void 0?!1:i,a=pr.useState(!1),s=a[0],u=a[1],l=pr.useRef(null),d=yce.useStyles(),f=bce.makeHtml(t),m=function(y){n(y.target.value)},g=function(y){var v=y.name,_=y.schema,x=_.openingTag,S=_.closingTag;if(l&&l.current){var C=l.current,p=C.value,w=C.selectionStart,b=C.selectionEnd,k=p.length,E=l.current.value.substring(w,b),I=/[^\n]+/g,j=E.match(I),P="",B=function(D,L,T,V){var H="";return D.forEach(function(q,N){L==="olist"?H+=N+1+". "+q+S+`
`:H+=""+T+q+V+`
`}),H};if(j&&j.length>0&&(v==="olist"||v==="ulist"))P=p.substring(0,w)+B(j,v,x,S)+p.substring(b,k);else{var W=""+x+E+S;P=p.substring(0,w)+W+p.substring(b,k)}n(P)}};return pr.default.createElement("div",{className:d.yamde},pr.default.createElement("div",{className:d.toolbar},pr.default.createElement("div",{className:d.buttons},S_.toolbarActions.filter(function(y){return r==null?void 0:r.includes(y.name)}).map(function(y){var v=y.name,_=y.icon,x=y.schema;return pr.default.createElement("div",{key:v,className:d.button,onClick:function(){return g({name:v,schema:x})}},_)})),pr.default.createElement("div",{className:d.viewSwitch},pr.default.createElement("div",{className:d.viewButton+" "+(s?"":d.activeView),onClick:function(){return u(!1)}},"Editor"),pr.default.createElement("div",{className:d.viewButton+" "+(s?d.activeView:""),onClick:function(){return u(!0)}},"Preview"))),pr.default.createElement("div",{className:d.contentArea},s?pr.default.createElement("div",{className:d.preview,dangerouslySetInnerHTML:{__html:f}}):pr.default.createElement("textarea",{rows:12,name:"yamdeContent",value:t,onChange:function(y){return m(y)},required:o,ref:l})),pr.default.createElement("div",{className:d.mobileButton},S_.toolbarActions.filter(function(y){return r==null?void 0:r.includes(y.name)}).map(function(y){var v=y.name,_=y.icon,x=y.schema;return pr.default.createElement("div",{key:v,className:d.button,onClick:function(){return g({name:v,schema:x})}},_)})))};Y3.default=wce;var v0={};Object.defineProperty(v0,"__esModule",{value:!0});v0.lightTheme=void 0;v0.lightTheme={buttonBackgroundColor:"#fff",buttonBorderColor:"#ddd",buttonColor:"#212121",buttonBackgroundColorHover:"#dcdcdc",switchButtonBackgroundColor:"whitesmoke",switchButtonBorderColor:"#ddd",switchButtonColorHover:"#333",switchButtonBackgroundColorHover:"#dcdcdc",switchButtonColorView:" #a0a0a0",switchButtonColorActiveView:"#333",switchButtonBackgroundColorActiveView:"#fff",switchButtonBorderColorActiveView:"#fff",textColor:"#333",contentAreaBackgroundColor:"#fff",textAreaBorderColor:"#ddd",previewAreaBorderColor:"#ddd",codeBlockBackgroundColor:"#ececec",linkColor:"#4183c4",quoteAdornmentColor:"#b9b9b9",tableBorderColor:"#ddd",textAreaSelectionBackgroundColor:"#a2a2a2",textAreaSelectionColor:"#000"};var y0={};Object.defineProperty(y0,"__esModule",{value:!0});y0.darkTheme=void 0;y0.darkTheme={buttonBackgroundColor:"#242424",buttonBorderColor:"#151515",buttonColor:"#777777",buttonBackgroundColorHover:"#1b1b1b",switchButtonBackgroundColor:"#242424",switchButtonBorderColor:"#151515",switchButtonColorHover:"#777777",switchButtonBackgroundColorHover:"#1b1b1b",switchButtonColorView:" #777777",switchButtonColorActiveView:"#777777",switchButtonBackgroundColorActiveView:"#1b1b1b",switchButtonBorderColorActiveView:"#1b1b1b",textColor:"#fff",contentAreaBackgroundColor:"#1b1b1b",textAreaBorderColor:"#151515",previewAreaBorderColor:"#151515",codeBlockBackgroundColor:"#383838",linkColor:"#4183c4",quoteAdornmentColor:"#b9b9b9",tableBorderColor:"#ddd",textAreaSelectionBackgroundColor:"#656565",textAreaSelectionColor:"#000"};var b0={};Object.defineProperty(b0,"__esModule",{value:!0});b0.defaultToolbarAction=void 0;b0.defaultToolbarAction=["bold","italic","strikethrough","heading1","heading2","heading3","ulist","olist","table","image","link","quote","code","hr"];var hT=xr&&xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(XA,"__esModule",{value:!0});var C_=hT(h),xce=EI,Sce=hT(Y3),Cce=v0,_ce=y0,kce=b0,jce=function(e){var t=e.value,n=e.handler,r=e.theme,i=r===void 0?"light":r,o=e.toolbar,a=o===void 0?kce.defaultToolbarAction:o;return C_.default.createElement(xce.ThemeProvider,{theme:i==="light"?Cce.lightTheme:_ce.darkTheme},C_.default.createElement(Sce.default,{value:t,handler:n,toolbar:a}))},Ece=XA.default=jce;function mT({resource:e,property:t,commit:n,...r}){const{darkMode:i}=Xe(),[o,a]=h.useState(void 0),[s,u]=re(e,t.subject,{handleValidationError:a,commit:n}),[l,d]=h.useState(s??""),f=m=>{d(m),u(m)};return c.jsxs(c.Fragment,{children:[c.jsx(ht,{children:c.jsx(Rce,{children:c.jsx(Ece,{value:l,handler:f,theme:i?"dark":"light",required:!1,...r})})}),s!==""&&o&&c.jsx(gn,{children:o.message}),s===""&&c.jsx(gn,{children:"Required"})]})}const Rce=A.div.withConfig({displayName:"InputMarkdown__YamdeStyling",componentId:"sc-2ef2e8bd-0"})(["display:flex;flex:1;.yamde-0-2-1{margin:0;}.contentArea-0-2-8 textarea,.preview-0-2-9{background:",";font-size:","rem;border:none;border-top:1px solid ",";&:focus{border:none;border-top:1px solid ",";}}.buttons-0-2-3{width:100%;}.button-0-2-10{background-color:",";width:unset;margin-right:unset;flex:1;border:unset;border-right:1px solid ",";&:last-of-type{border-right:unset;}}.viewButton-0-2-6:last-of-type{border-right:unset;}"],e=>e.theme.colors.bg,e=>e.theme.fontSizeBody,e=>e.theme.colors.bg2,e=>e.theme.colors.bg2,e=>e.theme.colors.bgBody,e=>e.theme.colors.bg2);function Z1({resource:e,property:t,commit:n,...r}){const[i,o,a]=Ws(),[s,u]=ao(e,t.subject,{handleValidationError:o,validate:!1,commit:n});function l(d){if(o(void 0),d.target.value==="")r.required&&o("Required"),u(void 0);else try{const f=+d.target.value;za(f,t.datatype),u(f)}catch{o("Invalid Number")}r.required&&d.target.value===""&&o("Required")}return c.jsxs(Pce,{children:[c.jsx(ht,{$invalid:!!i,children:c.jsx(wt,{placeholder:"Enter a number...",type:"number",value:s===void 0||Number.isNaN(s)?"":s,step:t.datatype===Z.INTEGER?1:"any",onChange:l,onBlur:a,...r})}),i&&c.jsx(Bg,{top:"2rem",children:i})]})}const Pce=A.div.withConfig({displayName:"InputNumber__Wrapper",componentId:"sc-727e6d98-0"})(["flex:1;position:relative;"]);function cc({checked:e,onChange:t,...n}){const r=i=>{t(i.target.checked)};return c.jsx(Ace,{type:"checkbox",checked:e,onChange:r,...n})}const Ace=A.input.withConfig({displayName:"Checkbox__InputCheckBox",componentId:"sc-615494d5-0"})(["--inset:1px;--size:calc(100% - (var(--inset) * 2));background-color:",";border:1px solid ",";width:1rem;height:1rem;border-radius:3px;position:relative;:checked{border:none;}:checked::before{content:'';position:absolute;inset:0;width:100%;height:100%;border-radius:2px;background-color:",";}:checked::after{--inset:3px;--size:calc(100% - (var(--inset) * 2));content:'';position:absolute;inset:var(--inset);width:var(--size);height:var(--size);background-color:",";clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.bg),X2=A.label.withConfig({displayName:"Checkbox__CheckboxLabel",componentId:"sc-615494d5-1"})(["display:flex;align-items:center;gap:0.5rem;cursor:pointer;"]);function Ice({resource:e,property:t,commit:n,...r}){const[i,o]=h.useState(void 0),[a,s]=e9(e,t.subject,{handleValidationError:o,commit:n});return c.jsxs(c.Fragment,{children:[c.jsx(cc,{checked:!!a,onChange:s,...r}),i&&c.jsx(gn,{children:i.message})]})}function Tce({resource:e,property:t,commit:n,...r}){const[i,o,a]=Ws(),[s,u]=re(e,t.subject,{handleValidationError:o,validate:!1,commit:n}),[l,d]=h.useState(s);function f(m){const g=Bs(m.target.value);d(g),o(void 0);try{g===""?u(void 0):(za(g,t.datatype),u(g))}catch{o("Invalid Slug")}r.required&&g===""&&o("Required")}return c.jsxs(Oce,{children:[c.jsx(ht,{$invalid:!!i,children:c.jsx(wt,{value:l??"",onChange:f,onBlur:a,...r})}),i&&c.jsx(Bg,{top:"2rem",children:i})]})}const Oce=A.div.withConfig({displayName:"InputSlug__Wrapper",componentId:"sc-f8ba1475-0"})(["flex:1;position:relative;"]);function Ic(e){switch(e.property.datatype){case Z.STRING:return c.jsx(g2,{...e});case Z.MARKDOWN:return c.jsx(mT,{...e});case Z.SLUG:return c.jsx(Tce,{...e});case Z.INTEGER:return c.jsx(Z1,{...e});case Z.FLOAT:return c.jsx(Z1,{...e});case Z.ATOMIC_URL:return c.jsx(Vre,{...e});case Z.RESOURCEARRAY:return c.jsx(N3,{...e});case Z.BOOLEAN:return c.jsx(Ice,{...e});case Z.TIMESTAMP:return c.jsx(Z1,{...e});default:return c.jsx(g2,{...e})}}function Uo({resource:e,propertyURL:t,datatype:n}){const[r,i]=h.useState(!1),o=qr(t),[a]=io(e,t),s=be(),{agent:u}=Xe();Me("esc",()=>{i(!1)},{enableOnTags:["INPUT","TEXTAREA","SELECT"]});const[l,d]=h.useState(void 0),f=u!==void 0;function m(){d(void 0),i(!1)}async function g(){try{await e.save(s),i(!1),lt.success("Resource saved")}catch(y){d(y),i(!0),lt.error("Could not save resource...")}}return a===void 0?null:!o&&!n?c.jsx("span",{title:`loading ${t}...`,children:"..."}):r?c.jsx(Q2,{children:c.jsxs(Ne,{gap:"0.5rem",children:[c.jsx(Ic,{"data-test":`input-${o.subject}`,resource:e,property:o,autoFocus:!0}),l&&c.jsx(gn,{children:l.message}),c.jsxs(Le,{gap:"0.5rem",children:[c.jsx(ue,{subtle:!0,onClick:m,children:"cancel"}),c.jsx(ue,{disabled:!f,title:f?"Save the edits":"You cannot save - there is no Agent set. Go to settings.",onClick:g,children:"save"})]})]})}):c.jsxs(Q2,{children:[c.jsx(IA,{value:a,datatype:n||o.datatype}),c.jsx(Dce,{title:"Edit value",children:c.jsx(Ha,{onClick:()=>i(!r)})})]})}const Q2=A.div.withConfig({displayName:"ValueForm__ValueFormWrapper",componentId:"sc-e287350b-0"})(["position:relative;flex:1;word-wrap:break-word;max-width:100%;"]),Dce=A.div.withConfig({displayName:"ValueForm__EditButton",componentId:"sc-e287350b-1"})(["position:absolute;top:0;color:",";right:100%;cursor:pointer;opacity:0;@media (hover:hover) and (pointer:fine){",":hover &{opacity:0.5;&:hover{opacity:1;}}}"],e=>e.theme.colors.main,Q2),Nce="main",gT="all-props";function Mce({propertyURL:e,resource:t,editable:n,columns:r,className:i}){const o=qr(e),a=XE(e,10,!0);return o.loading?c.jsx(ah,{columns:r,children:c.jsx(sh,{title:e+" is loading",children:"loading..."})}):o.error?c.jsxs(ah,{columns:r,children:[c.jsx(sh,{title:e+" could not be loaded",children:c.jsx(Ve,{subject:e,children:c.jsx(gt,{children:a})})}),c.jsx("code",{children:JSON.stringify(t.get(e))})]}):c.jsxs(ah,{columns:r,className:i,children:[c.jsx(Ve,{subject:e,children:c.jsx(sh,{title:o.description,children:o.shortname||a})}),n?c.jsx(Uo,{resource:t,propertyURL:e}):c.jsx(IA,{datatype:o.datatype,value:t.get(e)})]})}const ah=A.div.withConfig({displayName:"PropVal__PropValRow",componentId:"sc-251b19b1-0"})(["word-break:break-word;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr;@container "," (min-width:500px){grid-template-columns:23ch auto;grid-template-rows:1fr;}"],gT),sh=A.span.withConfig({displayName:"PropVal__PropertyLabel",componentId:"sc-251b19b1-1"})(["font-weight:bold;"]);function Vs({resource:e,except:t=[],editable:n,columns:r,basic:i}){const o=[...e.getPropVals()].filter(([a])=>!t.includes(a));return!o||o.length===0?null:c.jsx($ce,{basic:i,children:o.map(([a])=>c.jsx(Lce,{columns:r,basic:i,propertyURL:a,resource:e,editable:!!n},a))})}const $ce=A.div.withConfig({displayName:"AllProps__AllPropsWrapper",componentId:"sc-2e5e5dd7-0"})(["container:"," / inline-size;display:flex;flex-direction:column;border-radius:",";background-color:",";border:",";"],gT,e=>e.theme.radius,e=>e.basic?"transparent":e.theme.colors.bg,e=>e.basic?"none":`1px solid ${e.theme.colors.bg2}`),Lce=A(Mce).withConfig({displayName:"AllProps__StyledPropVal",componentId:"sc-2e5e5dd7-1"})(["",""],e=>!e.basic&&cn(["padding:0.5rem;border-top:solid 1px ",";&:nth-child(1){border-top-left-radius:",";border-top:none;border-top-right-radius:",";}"],e.theme.colors.bg1,e.theme.radius,e.theme.radius)),Fce=(e,t=0)=>{let n=3735928559^t,r=1103547991^t;for(let i=0,o;i<e.length;i++)o=e.charCodeAt(i),n=Math.imul(n^o,2654435761),r=Math.imul(r^o,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)};function vT(e,t){if(!t)throw new Error("Subject is required for transition name");return`${e}-${Fce(t??"")}`}function qa(e,t){let n;try{n=vT(e,t)}catch{return"view-transition-name: none"}return`view-transition-name: ${n}`}const Gr=A.div.withConfig({displayName:"Card",componentId:"sc-2f12122c-0"})(["background-color:",";border:solid 1px ",";box-shadow:",";padding:","rem;border-radius:",";max-height:",";overflow:",";",";"],e=>e.theme.colors.bg,e=>e.highlight?e.theme.colors.main:e.theme.colors.bg2,e=>e.highlight?`0 0 0 1px ${e.theme.colors.main}, ${e.theme.boxShadow}`:e.theme.boxShadow,e=>e.theme.margin,e=>e.theme.radius,e=>e.small?"10rem":"none",e=>e.small?"hidden":"visible",e=>qa("resource-page",e.about)),Os=A.div.withConfig({displayName:"Card__CardRow",componentId:"sc-2f12122c-1"})(["--border:solid 1px ",";display:block;border-top:",";padding:","rem ","rem;"],e=>e.theme.colors.bg2,e=>e.noBorder?"none":"var(--border)",e=>e.theme.margin/3,e=>e.theme.margin),Pd=A.div.withConfig({displayName:"Card__CardInsideFull",componentId:"sc-2f12122c-2"})(["margin-left:-","rem;margin-right:-","rem;"],e=>e.theme.margin,e=>e.theme.margin),zce=A.div.withConfig({displayName:"Card__Margin",componentId:"sc-2f12122c-3"})(["display:block;height:","rem;"],e=>e.theme.margin),lf=({resource:e,children:t})=>{const[n]=Se(e,ve.properties.isA),r=Fo(n[0]);return c.jsxs(Hce,{center:!0,gap:"1ch",children:[c.jsx(r,{}),c.jsx(Ve,{subject:e.getSubject(),children:c.jsx(Bce,{subject:e.getSubject(),children:e.title})}),t]})},Bce=A.h2.withConfig({displayName:"ResourceCardTitle__Title",componentId:"sc-4bc5e77-0"})(["font-size:1.4rem;margin:0;",";white-space:nowrap;text-overflow:ellipsis;"],e=>qa("page-title",e.subject)),Hce=A(Le).withConfig({displayName:"ResourceCardTitle__TitleRow",componentId:"sc-4bc5e77-1"})(["max-width:100%;height:2rem;overflow:hidden;color:",";svg{min-width:1em;}"],({theme:e})=>e.colors.textLight),ey=5;function Uce({resource:e,small:t}){const[n]=re(e,ve.properties.description),[r]=Se(e,eo.properties.members),[i,o]=h.useState(!1),a=r.length>ey;let s=r;return!i&&a&&(s=s.slice(0,ey)),c.jsxs(Ne,{gap:"0.5rem",children:[c.jsx(lf,{resource:e}),n&&c.jsx(It,{text:n}),c.jsx(Wce,{show:!t,children:s.length===0?c.jsx(Vce,{children:"No resources"}):c.jsxs(Pd,{children:[s.map(u=>c.jsx(Os,{children:c.jsx(Ft,{subject:u})},u)),a&&c.jsx(Os,{children:c.jsx(ue,{clean:!0,onClick:()=>o(!i),children:i?"show less":`show ${r.length-ey} more`})})]})})]})}const Wce=({show:e,children:t})=>e?t:null,Vce=A.span.withConfig({displayName:"CollectionCard__Empty",componentId:"sc-11fab6dd-0"})(["color:",";"],({theme:e})=>e.colors.textLight);function w0(e){const[t]=re(e,K.file.downloadUrl),[n]=re(e,K.file.mimetype),[r]=ao(e,K.file.filesize),i=h.useCallback(()=>{window.open(t)},[t]);if(t===void 0||n===void 0||r===void 0)throw new Error("File resource is missing properties");return{downloadFile:i,downloadUrl:t,bytes:r,mimeType:n}}function qce(){const e=xt();return c.jsx(ue,{type:"button",onClick:()=>e(Fe.agentSettings),title:"Go the the User Settings page",children:"Sign in"})}function yT({resource:e,children:t,error:n,clearError:r}){return c.jsx(Is,{resource:e==null?void 0:e.getSubject(),children:c.jsxs(Ne,{children:[t||c.jsx(yd,{error:n,showTrace:!0}),c.jsxs(Le,{children:[r&&c.jsx(ue,{onClick:r,children:"Clear error"}),c.jsx(ue,{onClick:()=>window.setTimeout(window.location.reload.bind(window.location),200),children:"Try Again"})]})]})})}function Gce(){const e=document.cookie.split(";");for(let t=0;t<e.length;t++){const n=e[t],r=n.indexOf("="),i=r>-1?n.substr(0,r):n;document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}}function Kce(){Gce(),localStorage.clear(),sessionStorage.clear(),window.location.reload()}function Yce({resource:e}){const{agent:t}=Xe(),n=be(),r=e.getSubject();return FE(e.error)?c.jsx(Is,{children:c.jsxs(Ne,{children:[c.jsx("h1",{children:"Unauthorized"}),t?c.jsxs(c.Fragment,{children:[c.jsx(yd,{error:e.error}),c.jsx("span",{children:c.jsx(ue,{onClick:()=>n.fetchResourceFromServer(r),children:"Retry"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"You don't have access to this, try signing in:"}),c.jsx(qce,{})]})]})}):c.jsx(Is,{children:c.jsxs(Ne,{children:[c.jsxs("h1",{children:["Could not open ",e.getSubject()]}),c.jsx(yd,{error:e.error}),c.jsxs(Le,{children:[c.jsx(ue,{onClick:()=>n.fetchResourceFromServer(r,{setLoading:!0}),children:"Retry"}),c.jsx(ue,{title:"Clear all local data & refresh page",onClick:Kce,children:"Hard reset"}),c.jsx(ue,{onClick:()=>n.fetchResourceFromServer(r,{fromProxy:!0,setLoading:!0}),title:`Fetches the URL from your current Atomic-Server (${n.getServerUrl()}), instead of from the actual URL itself. Can be useful if the URL is down, but the resource is cached in your server.`,children:"Use proxy"})]})]})})}class x0 extends h.Component{constructor(t){super(t),this.state={error:void 0}}static getDerivedStateFromError(t){return{error:t}}render(){return this.state.error?this.props.FallBackComponent?c.jsx(this.props.FallBackComponent,{error:this.state.error}):c.jsx(yT,{error:this.state.error,clearError:()=>this.setState({error:void 0}),info:{}}):this.props.children}}const Xce=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function ym(e){let t=0;for(;e>=1024&&++t;)e=e/1024;return e.toFixed(e<10&&t>0?1:0)+" "+Xce[t]}function bT({downloadFile:e,fileSize:t}){return c.jsx(Wt,{title:`Download file (${ym(t??0)})`,onClick:e,children:c.jsx(Qce,{})})}const Qce=A(Fx).withConfig({displayName:"DownloadButton__DownloadIcon",componentId:"sc-cdb23237-0"})(["color:",";"],({theme:e})=>e.colors.main);function Jce({downloadFile:e,fileSize:t}){return c.jsx(Zce,{onClick:e,title:`Download file (${ym(t??0)})`,children:c.jsxs(Le,{gap:"0.5rem",children:[c.jsx(Fx,{}),"Download"]})})}const Zce=A(ue).withConfig({displayName:"DownloadButton__StyledButton",componentId:"sc-cdb23237-1"})(["view-transition-name:download-button;"]),eue=e=>{const t=document.getElementById(e);if(t)return t;const n=document.createElement("style");return n.id=e,document.head.appendChild(n),n};function tue(e){const t=h.useId();h.useInsertionEffect(()=>{const n=eue(t);return n.innerHTML=e,()=>{document.head.removeChild(n)}},[e])}function wT(e){let t="",n="none";try{n=vT("file-image",e),t=`
::view-transition-old(${n}),
::view-transition-new(${n}) {
mix-blend-mode: normal;
height: 100%;
overflow: clip;
}
::view-transition-old(${n}) {
object-fit: contain;
}
::view-transition-new(${n}) {
animation: none;
object-fit: cover;
}
`}catch{}return tue(t),{viewTransitionName:n}}function nue({src:e,alt:t,className:n,subject:r}){const[i,o]=h.useState(!1),a=h.useContext(i3),s=wT(r);return Me("esc",()=>o(!1),{enabled:i}),a.current?c.jsxs(rue,{showFull:i,title:"Click to enlarge",onClick:()=>o(u=>!u),children:[!i&&c.jsx("img",{src:e,alt:t??"",className:n,"data-test":"image-viewer",loading:"lazy",style:s}),i&&Ln.createPortal(c.jsx(iue,{children:c.jsx("img",{src:e,alt:t??"","data-test":"image-viewer"})}),a.current)]}):c.jsx(c.Fragment,{})}const rue=A.button.withConfig({displayName:"ImageViewer__WrapperButton",componentId:"sc-4a41be2f-0"})(["cursor:",";border:none;padding:0;width:fit-content;height:fit-content;user-select:none;border-radius:",";background-color:transparent;&:hover,&:focus{outline:2px solid ",";}& img{border-radius:",";vertical-align:sub;}"],e=>e.showFull?"zoom-out":"zoom-in",e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.radius),iue=A.div.withConfig({displayName:"ImageViewer__Viewer",componentId:"sc-4a41be2f-1"})(["position:fixed;inset:0;width:100vw;height:100%;max-height:100vh;max-height:100dvh;display:grid;place-items:center;padding:","rem;z-index:200;background-color:rgba(0,0,0,0.85);cursor:zoom-out;backdrop-filter:blur(5px);& img{height:90%;max-width:100%;max-height:100vh;object-fit:contain;border-radius:",";}"],e=>e.theme.margin,e=>e.theme.radius),oue=async(e,t,n)=>(await fetch(e,{credentials:"include",headers:{Accept:n},signal:t})).text();function xT({downloadUrl:e,mimeType:t,className:n}){const[r,i]=h.useState("");return h.useEffect(()=>{const o=new AbortController;return oue(e,o.signal,t).then(a=>i(a)),()=>o.abort()},[e]),t==="text/markdown"?c.jsx("div",{className:n,children:c.jsx(It,{text:r})}):c.jsx(aue,{className:n,children:r})}const aue=A.pre.withConfig({displayName:"TextPreview__Wrapper",componentId:"sc-def5f285-0"})(["white-space:pre-wrap;"]),sue=new Set(["application/json","application/ld+json","application/ad+json","application/x-httpd-php","application/xhtml+xml","application/xml","application/x-sh"]),ST=e=>(e==null?void 0:e.startsWith("text/"))||sue.has(e),__=10*1024*1024,lue=1024*100;function s4(){const[e,t]=h.useState(__),n=kc("(prefers-reduced-data: reduce)");return h.useEffect(()=>{t(n?lue:__)},[n]),e}const cue=h.lazy(()=>Sg(()=>import("./chunk_index.js"),__vite__mapDeps([0,1])));function CT({resource:e,hideTypes:t}){const{downloadUrl:n,mimeType:r,bytes:i}=w0(e),[o,a]=h.useState(!1),s=s4(),u=pue(r,t);return i>s&&!o?c.jsx(fue,{bytes:i,onClick:()=>a(!0)}):u("image/")?c.jsx(uue,{src:n,subject:e.getSubject()}):u("video/")?c.jsxs("video",{controls:!0,width:"100%",children:[c.jsx("source",{src:n,type:r}),"Sorry, your browser doesn't support embedded videos."]}):u("audio/")?c.jsx("audio",{controls:!0,children:c.jsx("source",{src:n,type:r})}):ST(r)?c.jsx(due,{downloadUrl:n,mimeType:r}):u("application/pdf")?c.jsx(h.Suspense,{children:c.jsx(cue,{url:n})}):c.jsx(_T,{children:"No preview available"})}const uue=A(nue).withConfig({displayName:"FilePreview__StyledImageViewer",componentId:"sc-26b8f0c0-0"})(["width:100%;"]),_T=A.div.withConfig({displayName:"FilePreview__NoPreview",componentId:"sc-26b8f0c0-1"})(["display:grid;place-items:center;border:1px solid ",";border-radius:",";background-color:",";height:8rem;"],({theme:e})=>e.colors.bg2,({theme:e})=>e.radius,({theme:e})=>e.colors.bg1),due=A(xT).withConfig({displayName:"FilePreview__StyledTextPreview",componentId:"sc-26b8f0c0-2"})(["width:100%;border:1px solid ",";background-color:",";border-radius:",";padding:","rem;"],({theme:e})=>e.colors.bg2,({theme:e})=>e.colors.bg,({theme:e})=>e.radius,({theme:e})=>e.margin);function fue({bytes:e,onClick:t}){const n=s4();return c.jsxs(_T,{children:[c.jsxs("p",{children:["Preview hidden because the file is larger than"," ",ym(n),"."]}),c.jsx("p",{children:c.jsxs(ue,{onClick:t,children:["Load anyway (",ym(e),")"]})})]})}const pue=(e,t=[])=>n=>!t.includes(n)&&e.startsWith(n);function hue(e){const t=h.useMemo(()=>{const n=()=>c.jsxs(c.Fragment,{children:[c.jsx(Ve,{subject:e.resource.getSubject(),children:e.resource.title}),c.jsx("div",{children:"Can not show file due to invalid data."})]});return n.displayName="FileError",n},[e.resource.getSubject(),e.resource.title]);return c.jsx(x0,{FallBackComponent:t,children:c.jsx(mue,{...e})})}function mue({resource:e}){const{downloadFile:t,bytes:n}=w0(e);return c.jsxs(c.Fragment,{children:[c.jsxs(Le,{justify:"space-between",children:[c.jsx(lf,{resource:e}),c.jsx(bT,{downloadFile:t,fileSize:n})]}),c.jsx(CT,{resource:e,hideTypes:["application/pdf"]})]})}const Ad=A.div.withConfig({displayName:"Detail",componentId:"sc-328e8796-0"})(["display:inline-flex;align-items:center;gap:1ch;margin-right:2rem;"]),l4=A.div.withConfig({displayName:"Detail__Details",componentId:"sc-328e8796-1"})(["font-style:italic;margin-bottom:0.5rem;margin-top:-0.5rem;"]),gue=new Intl.ListFormat("en-GB",{style:"long",type:"conjunction"});function kT({subjects:e}){const t=e.filter(n=>n!==void 0);return c.jsx(c.Fragment,{children:gue.formatToParts(t).map(({type:n,value:r})=>n==="literal"?r:c.jsx(Ft,{subject:r},r))})}function c4({resource:e}){const[t]=Se(e,K.isA);return c.jsx(c.Fragment,{children:t&&c.jsx(Ad,{children:c.jsxs(c.Fragment,{children:["is a ",Fo(t[0]),c.jsx(kT,{subjects:t})]})})})}function Tc({commitSubject:e}){const t=ae(e),[n]=re(t,K.commit.signer),[r]=re(t,K.commit.previousCommit),i=zz(t,K.commit.createdAt);return e?!e||!t.isReady?c.jsx(Ad,{children:"loading..."}):c.jsxs(Ad,{children:[n&&c.jsx(Ft,{subject:n}),"-",c.jsxs(Ve,{subject:e,children:[r?"edited ":"",i&&c.jsx(I3,{date:i})]})," "]}):null}const vue={commit:!0,validate:!1};function fo({resource:e,parentRef:t,id:n,className:r,...i}){const[o,a]=nt(e,1/0,vue),[s,u]=h.useState(!1),l=h.useRef(null),d=t||l,[f]=Sr(e);Me("enter",()=>{u(!1)},{enableOnTags:["INPUT"]}),Me("esc",()=>{u(!1)},{enableOnTags:["INPUT"]});function m(){u(!0)}const g=f?"set a title":"Untitled";return h.useEffect(()=>{var y,v;(y=d.current)==null||y.focus(),(v=d.current)==null||v.select()},[s]),s?c.jsx(yue,{ref:d,"data-test":"editable-title",...i,onFocus:m,placeholder:g,onChange:y=>a(y.target.value),value:o||"",onBlur:()=>u(!1),className:r}):c.jsx(ET,{disabled:!f,id:n,canEdit:!!f,title:f?"Edit title":"View title","data-test":"editable-title",onClick:m,subtle:!!f&&!o,subject:e.getSubject(),className:r,children:c.jsxs(c.Fragment,{children:[o||g,f&&c.jsx(bue,{})]})})}const jT=cn(["line-height:1.1;"]),ET=A.h1.withConfig({displayName:"EditableTitle__Title",componentId:"sc-a9ee3872-0"})([""," display:flex;align-items:center;gap:","rem;justify-content:space-between;cursor:pointer;cursor:",";opacity:",";",";"],jT,e=>e.theme.margin,e=>e.canEdit?"pointer":"initial",e=>e.subtle?.5:1,e=>qa("page-title",e.subject)),yue=A.input.withConfig({displayName:"EditableTitle__TitleInput",componentId:"sc-a9ee3872-1"})([""," margin-bottom:","rem;font-size:","rem;color:",";border:none;font-weight:bold;display:block;padding:0;margin-top:0;outline:none;background-color:transparent;margin-bottom:","rem;font-family:",";word-wrap:break-word;word-break:break-all;overflow:visible;&:focus{outline:none;}"],jT,e=>e.theme.margin,e=>e.theme.fontSizeH1,e=>e.theme.colors.text,e=>e.theme.margin,e=>e.theme.fontFamilyHeader),bue=A(Ha).withConfig({displayName:"EditableTitle__Icon",componentId:"sc-a9ee3872-2"})(["opacity:0;font-size:0.8em;",":hover &{opacity:0.5;&:hover{opacity:1;}}"],ET),u4=[K.name,K.shortname,K.file.filename,K.description,K.isA,K.parent,K.write,K.read,K.commit.lastCommit];function wue({resource:e}){const[t]=re(e,K.commit.lastCommit);return c.jsxs(Et,{children:[c.jsx(fo,{resource:e}),c.jsxs(l4,{children:[c.jsx(c4,{resource:e}),c.jsx(Tc,{commitSubject:t})]}),c.jsx(Uo,{resource:e,propertyURL:K.description}),c.jsx(Vs,{resource:e,except:u4,editable:!0,columns:!0})]})}function xue({resource:e}){const[t]=re(e,K.description),[n]=re(e,K.parent),[r]=re(e,K.commit.lastCommit);return c.jsxs(c.Fragment,{children:[c.jsxs(l4,{children:[c.jsxs(Ad,{children:["Message in ",c.jsx(Ft,{subject:n})]}),c.jsx(Tc,{commitSubject:r})]}),c.jsx(It,{text:t||""})]})}var bm;(function(e){e[e.Plain=0]="Plain",e[e.Button=1]="Button"})(bm||(bm={}));function d4({to:e,children:t,variant:n}){const r=n===1?Cue:Sue;return c.jsxs(r,{href:e,target:"_blank",rel:"noreferrer",children:[t,c.jsx(sg,{})]})}d4.defaultProps={variant:0};const Sue=A.a.withConfig({displayName:"ExternalLink__ExternalLinkPlain",componentId:"sc-8f10863f-0"})(["display:flex;align-items:center;gap:0.5rem;"]),Cue=A.a.withConfig({displayName:"ExternalLink__ExternalLinkButton",componentId:"sc-8f10863f-1"})(["padding-inline:0.8rem;padding-block:0.4rem;width:fit-content;background-color:",";border:1.5px solid ",";border-radius:",";text-decoration:none;gap:1ch;display:flex;align-items:center;font-weight:600;justify-content:center;color:",";white-space:nowrap;transition:0.1s transform,0.1s background-color,0.1s box-shadow,0.1s color;&:hover,&:focus-within{background-color:",";color:white;}"],e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.main);function _ue({resource:e}){const[t]=re(e,F.properties.bookmark.url),[n]=re(e,F.properties.bookmark.preview);return c.jsxs(Ne,{gap:"0.5rem",children:[c.jsx(lf,{resource:e}),c.jsx(d4,{to:t,variant:bm.Button,children:"Open site"}),n&&c.jsx(kue,{children:c.jsx(It,{maxLength:1e3,renderGFM:!0,text:n})})]})}const kue=A.div.withConfig({displayName:"BookmarkCard__MarkdownWrapper",componentId:"sc-4b6072c6-0"})(["margin-top:","rem;margin-inline:-","rem;padding:","rem;background-color:",";border-top:1px solid ",";img{border-radius:",";}"],e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.colors.bgBody,e=>e.theme.colors.bg2,e=>e.theme.radius);function jue({resource:e}){const[t]=re(e,F.properties.parent),n=ae(t),[r]=re(e,F.properties.description);return c.jsxs(Ne,{gap:"0.5rem",children:[c.jsx(lf,{resource:n}),c.jsx(It,{text:r??""})]})}const Id=A.div.withConfig({displayName:"components__GridCard",componentId:"sc-848528d3-0"})(["grid-area:card;background-color:",";border-radius:",";overflow:hidden;box-shadow:var(--shadow),var(--interaction-shadow);border:1px solid ",";transition:border 0.1s ease-in-out,box-shadow 0.1s ease-in-out;",";"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>qa("resource-page",e.subject)),Td=A.a.withConfig({displayName:"components__GridItemWrapper",componentId:"sc-848528d3-1"})(["--shadow:0px 0.7px 1.3px rgba(0,0,0,0.06),0px 1.8px 3.2px rgba(0,0,0,0.043),0px 3.4px 6px rgba(0,0,0,0.036),0px 6px 10.7px rgba(0,0,0,0.03),0px 11.3px 20.1px rgba(0,0,0,0.024),0px 27px 48px rgba(0,0,0,0.017);--interaction-shadow:0px 0px 0px 0px ",";--card-banner-padding:1rem;--card-banner-height:calc(var(--card-banner-padding) * 2 + 1.5em);outline:none;text-decoration:none;color:",";display:grid;grid-template-columns:1fr;grid-template-rows:1fr 2rem;grid-template-areas:'card' 'title';width:100%;aspect-ratio:1 / 1;cursor:pointer;gap:1rem;&:hover ",",&:focus ","{--interaction-shadow:0px 0px 0px 1px ",";border:1px solid ",";}&:hover,&:focus{color:",";}"],e=>e.theme.colors.main,e=>e.theme.colors.text1,Id,Id,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.main),RT=A.div.withConfig({displayName:"components__GridItemTitle",componentId:"sc-848528d3-2"})(["grid-area:title;font-size:1rem;text-align:center;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;padding-inline:0.5rem;transition:color 0.1s ease-in-out;",";"],e=>qa("page-title",e.subject)),f4=A.div.withConfig({displayName:"components__GridItemDescription",componentId:"sc-848528d3-3"})(["font-size:1.1rem;color:",";margin:","rem;overflow:hidden;height:calc(100% - ","rem);"],e=>e.theme.colors.textLight,e=>e.theme.margin,e=>e.theme.margin*2),qs=A.div.withConfig({displayName:"components__InnerWrapper",componentId:"sc-848528d3-4"})(["pointer-events:none;width:100%;height:calc(100% - var(--card-banner-height));"]);function Eue({onClick:e}){return c.jsx(Rue,{as:"button",onClick:e,children:c.jsx(qn,{})})}const Rue=A(Id).withConfig({displayName:"NewCard__Thing",componentId:"sc-6b870264-0"})(["background-color:",";border:1px solid ",";cursor:pointer;display:grid;place-items:center;height:100%;width:100%;font-size:3rem;color:",";transition:color 0.1s ease-in-out,font-size 0.1s ease-out,border-color 0.1s ease-in-out;&:hover,&:focus{color:",";font-size:3.8rem;border-color:",";}:active{font-size:3rem;}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main);function S0({accept:e,parentResource:t,text:n,maxFiles:r,className:i,onFilesUploaded:o}){const{upload:a,isUploading:s,error:u}=O3(t),l=h.useCallback(async g=>{const y=await a(g);o==null||o(y)},[a]),{getRootProps:d,getInputProps:f}=Ug({onDrop:l,maxFiles:r,accept:e}),m=r===1?"Drop a file or click here to upload.":"Drop files or click here to upload.";return c.jsx(c.Fragment,{children:c.jsxs(Pue,{...d(),className:i,children:[u&&c.jsx(gn,{children:u.message}),c.jsx("input",{...f()}),c.jsxs(Aue,{children:[c.jsx(H9,{})," ",s?"Uploading...":n??m]})]})})}const Pue=A.div.withConfig({displayName:"FileDropzoneInput__VisualDropZone",componentId:"sc-396bd1b8-0"})(["backdrop-filter:blur(10px);border:2px dashed ",";border-radius:",";display:grid;place-items:center;font-size:1.3rem;color:",";min-height:10rem;cursor:pointer;&:hover,&:focus{color:",";border-color:",";}"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main),Aue=A.div.withConfig({displayName:"FileDropzoneInput__TextWrapper",componentId:"sc-396bd1b8-1"})(["display:flex;align-items:center;padding:","rem;gap:1rem;"],e=>e.theme.margin),PT={properties:{coverImage:"https://atomicdata.dev/Folder/wp8ame4nqf/urHO7G8FKm"}},Iue={commit:!0},k_={accept:["image/*"],maxFiles:1,text:"Click or drop image to use as a cover"};function Tue({resource:e,canEdit:t}){const[n,r]=re(e,PT.properties.coverImage,Iue),i=ae(n),[o]=re(i,K.file.downloadUrl),a=h.useCallback(s=>{r(s[0])},[r]);return!o&&!t?c.jsx(c.Fragment,{}):o?c.jsxs(Due,{children:[c.jsx(Oue,{src:o,alt:""}),t&&c.jsx(J2,{children:c.jsx(Nue,{...k_,parentResource:e,onFilesUploaded:a})})]}):c.jsx(S0,{...k_,parentResource:e,onFilesUploaded:a})}const Oue=A.img.withConfig({displayName:"ArticleCover__CoverImage",componentId:"sc-9c78373d-0"})(["object-fit:cover;height:100%;width:100%;"]),J2=A.div.withConfig({displayName:"ArticleCover__DropzoneWrapper",componentId:"sc-9c78373d-1"})(["opacity:0;position:absolute;z-index:2;inset:0;height:100%;width:100%;",""],Wn("opacity")),Due=A.div.withConfig({displayName:"ArticleCover__CoverWrapper",componentId:"sc-9c78373d-2"})(["&:hover ",",&:focus-within ","{opacity:1 !important;}position:relative;width:calc(100% + ","rem);margin-inline:-","rem;margin-top:-","rem;height:13rem;"],J2,J2,({theme:e})=>e.margin*2,({theme:e})=>e.margin,({theme:e})=>e.margin),Nue=A(S0).withConfig({displayName:"ArticleCover__StyledDropzone",componentId:"sc-9c78373d-3"})(["height:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;"]);function Mue({resource:e,canEdit:t}){const n=be(),[r]=re(e,K.description),[i,o]=h.useState(!1),a=async()=>{try{await e.save(n),o(!1),lt.success("Content saved")}catch{o(!0),lt.error("Could not save resource...")}};return!i&&t&&!r?c.jsxs(Fue,{onClick:()=>o(!0),children:[c.jsx(qn,{}),"Add Content"]}):i?c.jsxs(c.Fragment,{children:[c.jsx(Mr,{resource:e,propertyURL:K.description}),c.jsx("div",{children:c.jsx(ue,{onClick:a,children:"Save"})})]}):c.jsxs($ue,{children:[t&&c.jsx(Lue,{onClick:()=>o(!0),title:"Edit content",variant:Pa.Colored,color:"main",children:c.jsx(Ha,{})}),c.jsx(It,{text:r??""})]})}const $ue=A.div.withConfig({displayName:"ArticleDescription__DescriptionWrapper",componentId:"sc-2e2282f1-0"})(["position:relative;"]),Lue=A(Wt).withConfig({displayName:"ArticleDescription__EditButton",componentId:"sc-2e2282f1-1"})(["position:absolute;top:0;right:0;"]),Fue=A.button.withConfig({displayName:"ArticleDescription__AddContentButton",componentId:"sc-2e2282f1-2"})(["width:100%;border:1px solid ",";background-color:",";border-radius:",";height:25rem;display:flex;align-items:center;justify-content:center;gap:1ch;color:",";cursor:pointer;",";&:hover,&:focus{border-color:",";color:",";}"],({theme:e})=>e.colors.bg2,({theme:e})=>e.colors.bgBody,({theme:e})=>e.radius,({theme:e})=>e.colors.textLight,Wn("border-color","color"),({theme:e})=>e.colors.main,({theme:e})=>e.colors.main);function zue({resource:e}){const[t]=re(e,K.commit.lastCommit),[n]=Sr(e),r=Uz(e),i=_c(),o=h.useCallback(()=>{i(ft.article,{[K.name]:"New Article",[K.publishedAt]:Vd(),[K.description]:""},e.getSubject())},[i]);return c.jsx(c.Fragment,{children:c.jsxs(Ne,{gap:"2rem",children:[c.jsx(Uue,{children:c.jsx(Bue,{children:c.jsxs(Ne,{children:[c.jsx(Tue,{resource:e,canEdit:n}),c.jsxs(Hue,{children:[c.jsx(fo,{resource:e}),c.jsx(Tc,{commitSubject:t})]}),c.jsx(Mue,{resource:e,canEdit:n}),c.jsx(HA,{parentResource:e})]})})}),c.jsx(Wue,{children:c.jsxs(que,{children:[c.jsx("h2",{children:"Children"}),c.jsxs(Vue,{children:[r.map(a=>c.jsx(j_,{children:c.jsx(Oc,{subject:a})},a)),n&&c.jsx(j_,{children:c.jsx(Eue,{onClick:o})})]})]})})]})})}const Bue=A.div.withConfig({displayName:"ArticlePage__Content",componentId:"sc-136b7316-0"})(["position:relative;background-color:",";padding:","rem;border-radius:",";border:solid 1px ",";overflow:hidden;"],({theme:e})=>e.colors.bg,({theme:e})=>e.margin,({theme:e})=>e.radius,({theme:e})=>e.colors.bg2),Hue=A.div.withConfig({displayName:"ArticlePage__HeadingWrapper",componentId:"sc-136b7316-1"})(["display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;h1{margin-bottom:0;}"]),Uue=A(Is).withConfig({displayName:"ArticlePage__ArticleContainer",componentId:"sc-136b7316-2"})(["padding-bottom:0;&:last-child{padding-bottom:10rem;}"]),Wue=A.section.withConfig({displayName:"ArticlePage__ChildrenSection",componentId:"sc-136b7316-3"})(["width:100%;background-color:",";padding-top:","rem;"],({theme:e})=>e.colors.bg,({theme:e})=>e.margin),Vue=A.div.withConfig({displayName:"ArticlePage__Grid",componentId:"sc-136b7316-4"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(20rem,1fr));gap:","rem;"],({theme:e})=>e.margin),que=A(Is).withConfig({displayName:"ArticlePage__ContainerWider",componentId:"sc-136b7316-5"})(["width:min(100%,80rem);"]),j_=A.div.withConfig({displayName:"ArticlePage__Height",componentId:"sc-136b7316-6"})(["min-height:12rem;& > *{height:100%;}"]);function Gue({resource:e}){const[t]=re(e,ve.properties.description),n=hne(t??"").slice(0,200);return c.jsxs("div",{children:[c.jsx(Ve,{subject:e.getSubject(),children:c.jsx(Kue,{subject:e.getSubject(),children:e.title})}),c.jsxs("p",{children:[n,"..."]})]})}const Kue=A.h2.withConfig({displayName:"ArticleCard__Title",componentId:"sc-eafe2463-0"})(["white-space:nowrap;text-overflow:ellipsis;width:100%;overflow:hidden;font-size:1.3rem;",""],e=>qa("page-title",e.subject));function Oc(e){const{subject:t,initialInView:n}=e,[r,i]=h.useState(!1),{ref:o,inView:a}=Cne({threshold:0,initialInView:n});return h.useEffect(()=>{a&&!r&&i(!0)},[a,r]),c.jsx(h.Suspense,{children:c.jsx(Gr,{ref:o,...e,about:t,children:r?c.jsx(Yue,{...e}):c.jsxs(c.Fragment,{children:[c.jsx("h2",{children:c.jsx(Ve,{subject:t,children:t})}),c.jsx("p",{children:"Resource is loading..."})]})})})}function Yue(e){const{subject:t}=e,n=ae(t),[r]=nt(n),[i]=re(n,ve.properties.isA);if(n.loading)return c.jsx("p",{children:"Loading..."});if(n.error)return c.jsxs(gt,{children:[c.jsx(Ve,{subject:t,children:c.jsx("h2",{children:r})}),n.error.message]});switch(i){case eo.classes.collection:return c.jsx(Uce,{resource:n,...e});case xa.classes.file:return c.jsx(hue,{resource:n,...e});case Be.classes.message:return c.jsx(xue,{resource:n,...e});case Be.classes.bookmark:return c.jsx(_ue,{resource:n,...e});case Be.classes.paragraph:return c.jsx(jue,{resource:n,...e});case Be.classes.article:return c.jsx(Gue,{resource:n,...e});default:return c.jsx(p4,{resource:n,...e})}}function p4({resource:e,small:t}){const[n]=Se(e,ve.properties.isA),r=ae(n[0]);return c.jsxs(Ne,{gap:"0.5rem",children:[c.jsx(lf,{resource:e,children:c.jsx(Que,{children:r.title})}),c.jsx(Xue,{children:c.jsx(Uo,{resource:e,propertyURL:ve.properties.description})}),!t&&c.jsx(Vs,{basic:!0,resource:e,except:u4,editable:!0})]})}const Xue=A.div.withConfig({displayName:"ResourceCard__DescriptionWrapper",componentId:"sc-a71226a-0"})(["max-height:10rem;overflow:hidden;"]),Que=A.span.withConfig({displayName:"ResourceCard__ClassName",componentId:"sc-a71226a-1"})(["margin-left:auto;"]);function Jue({resource:e,members:t,columns:n}){const r=n.filter(i=>i!==F.properties.shortname);return e===null?null:c.jsxs(Zue,{children:[c.jsx(ede,{columns:r}),t.length>0?c.jsx("tbody",{children:t.map(i=>c.jsx(nde,{propsArray:r,subject:i},i))}):c.jsx("p",{children:"This collection is empty"})]})}const Zue=A.table.withConfig({displayName:"Table__TableStyled",componentId:"sc-a60d183d-0"})(["overflow-y:auto;border-collapse:collapse;margin-left:","rem;margin-right:","rem;margin-bottom:","rem;width:calc(100% + 2rem);"],e=>-e.theme.margin,e=>-e.theme.margin,e=>e.theme.margin);function ede({columns:e}){return c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx(IT,{style:{minWidth:"10rem"},children:"subject"}),e.map(t=>c.jsx(tde,{subject:t},t))]})})}function tde({subject:e}){const[t,n]=Jh("sort_by"),[r,i]=Jh("sort_desc"),o=qr(e),a=!o.isDynamic;function s(){t===e?i(r==="true"?void 0:"true"):n(e)}const u=t===e;let l="6rem";switch(o.datatype){case Z.STRING:case Z.RESOURCEARRAY:l="15rem";break;case Z.MARKDOWN:l="25rem";break;case Z.BOOLEAN:case Z.INTEGER:l="6rem";break}return c.jsxs(IT,{style:{minWidth:l},children:[c.jsx(Ft,{subject:e})," ",a&&c.jsx(ue,{onClick:s,subtle:!u,icon:!0,"data-test":`sort-${e}`,children:u?r==="true"?c.jsx(gW,{}):c.jsx(vW,{}):c.jsx(yW,{})})]})}const nde=h.memo(function({subject:t,propsArray:n}){const r=ae(t,{allowIncomplete:!0});return r===null?null:c.jsxs(rde,{about:t,children:[c.jsx(TT,{children:c.jsx(Ft,{subject:t})}),n.map(i=>c.jsx(ode,{resource:r,prop:i},i))]})}),rde=A.tr.withConfig({displayName:"Table__RowStyled",componentId:"sc-a60d183d-1"})(["background-color:",";border-top:solid 1px ",";&:last-child{border-bottom:solid 1px ",";}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.bg2),ide=A.div.withConfig({displayName:"Table__CellContainer",componentId:"sc-a60d183d-2"})(["overflow:auto;max-height:5rem;max-width:40rem;"]);function ode({resource:e,prop:t}){return c.jsx(TT,{children:c.jsx(ide,{children:c.jsx(Uo,{resource:e,propertyURL:t,noMargin:!0},t)})})}const AT=cn(["padding:","rem;padding-left:","rem;vertical-align:top;&:last-child{width:100% !important;max-width:100% !important;}"],e=>e.theme.margin/2,e=>e.theme.margin),IT=A.th.withConfig({displayName:"Table__CellHeaderStyled",componentId:"sc-a60d183d-3"})(["text-align:left;"," font-weight:bold;white-space:nowrap;"],AT),TT=A.td.withConfig({displayName:"Table__CellStyled",componentId:"sc-a60d183d-4"})(["",""],AT);class ts{constructor(t,n){typeof t=="number"?(this.location=t,this.length=n):(this.location=-1,this.length=0)}max(t){return typeof t=="number"&&(this.length=t-this.location),this.location+this.length}isValid(){return this.location>-1}toArray(){return[this.location,this.max()]}toString(){return this.location==-1?"invalid range":"["+this.location+","+this.max()+")"}}const ade={wordSeparators:`-/\\:()<>%._=&[]+
\r`,uppercaseLetters:(()=>{const t=[];for(let n=0;n<26;n++)t.push(String.fromCharCode(65+n));return t.join("")})(),ignoredScore:.9,skippedScore:.15,emptyQueryScore:0},sde={longStringLength:150,maxMatchStartPct:.15,minMatchDensityPct:.75,maxMatchDensityPct:.95,beginningOfStringPct:.1};class C0{constructor(t){Object.assign(this,ade,t)}useSkipReduction(){return!0}adjustRemainingScore(t,n,r,i,o,a,s,u){return r*a.length}}class lde extends C0{constructor(t){super(Object.assign({},sde,t))}useSkipReduction(t,n,r,i,o,a,s){const u=t.length,l=u<=this.longStringLength,d=s.location/u;return l||d<this.maxMatchStartPct}adjustRemainingScore(t,n,r,i,o,a,s,u){const l=t.length<=this.longStringLength,d=u.location/t.length;let f=1,m=1-d;return i||(f=n.length/u.length,f=l&&d<=this.beginningOfStringPct&&f>=this.minMatchDensityPct?1:f,m=f>=this.maxMatchDensityPct?1:m),r*Math.min(a.length,this.longStringLength)*f*m}}function OT(e){return e instanceof C0?e:new lde(e)}const cde=OT();new C0;new C0({emptyQueryScore:.9,adjustRemainingScore:function(e,t,n,r,i,o,a,s){let u=n*o.length;return r||(u+=(a.location-i.location)/2),u}});function DT(e="",t="",n,r=e.toLocaleLowerCase(),i=t.toLocaleLowerCase(),o=cde,a=new ts(0,e.length)){if(!t)return o.emptyQueryScore;return s(a,new ts(0,t.length),new ts);function s(u,l,d){if(!l.length)return o.ignoredScore;if(l.length>u.length)return 0;const f=n&&n.length;for(let m=l.length;m>0;m--){const g=i.substring(l.location,l.location+m),y=ude(r,g,new ts(u.location,u.length-l.length+m));if(!y.isValid())continue;d.isValid()?d.location=Math.min(d.location,y.location):d.location=y.location,d.max(y.max()),n&&n.push([y.location,y.max()]);const v=new ts(y.max(),u.max()-y.max()),_=new ts(l.location+m,l.length-m),x=s(v,_,d);if(x){let S=v.location-u.location,C=!0;const p=o.useSkipReduction(e,t,x,v,u,v,y,d);if(y.location>u.location)if(p&&o.wordSeparators.indexOf(e[y.location-1])>-1)for(let w=y.location-2;w>=u.location;w--)o.wordSeparators.indexOf(e[w])>-1?S--:S-=o.skippedScore;else if(p&&o.uppercaseLetters.indexOf(e[y.location])>-1)for(let w=y.location-1;w>=u.location;w--)o.uppercaseLetters.indexOf(e[w])>-1?S--:S-=o.skippedScore;else S-=y.location-u.location,C=!1;return S+=o.adjustRemainingScore(e,t,x,C,u,v,y,d),S/=u.length,S}else n&&(n.length=f)}return 0}}DT.createConfig=OT;function ude(e,t,n){const i=e.substring(n.location,n.max()).indexOf(t),o=new ts;return i>-1&&(o.location=i+n.location,o.length=t.length),o}class dde{constructor(t=[],n={}){let r=n;n instanceof Array&&(r={keys:n});const{scorer:i=DT,transformString:o=this.transformString,keys:a=[],minimumScore:s=0,config:u}=r;this.scorer=i,this.minimumScore=s,this.config=u,this.transformString=o,typeof i.createConfig=="function"&&(this.config=i.createConfig(u)),this.setKeys(a),this.setItems(t),this.compareScoredStrings=this.compareScoredStrings.bind(this)}search(t){const n=[],{items:r,transformedItems:i,keys:o,config:a}=this,s=t?this.minimumScore:-1,u=this.transformString(t);if(o.length)for(let l=0,d=r.length;l<d;l++){const f=r[l],m=i[l],g={item:f,score:0,scoreKey:"",scores:{},matches:{},_:m};let y=0,v="";for(let _=0,x=o.length;_<x;_++){const S=o[_],{name:C}=S,p=m[C];if(p){const w=this.getItemString(f,S),b=[],k=S.scorer(w,t,b,p,u,a);g.scores[C]=k,g.matches[C]=b,k>y&&(y=k,v=C)}}y>s&&(g.score=y,g.scoreKey=v,n.push(g))}else for(let l=0,d=r.length;l<d;l++){const f=r[l],m=i[l],g=[],y=this.scorer(f,t,g,m,u,a);y>s&&n.push({item:f,score:y,matches:g,_:m})}return n.sort(this.compareScoredStrings),n}setKeys(t){if(this.keys=[].concat(t),this.keys.length){const{scorer:n}=this;this.keys=this.keys.map(r=>{const i=typeof r=="string"?{name:r,scorer:n}:r;return i.name.indexOf(".")>-1&&(i.path=i.name.split(".")),i}),this.defaultKeyName=this.keys[0].name}else this.defaultKeyName=null}setItems(t){const{keys:n}=this,r=[];if(this.items=[].concat(t),this.transformedItems=r,n.length)for(let i=0,o=t.length;i<o;i++){const a=t[i],s={};for(let u=0,l=n.length;u<l;u++){const d=n[u],f=this.getItemString(a,d);f&&typeof f=="string"&&(s[d.name]=this.transformString(f))}r.push(s)}else for(let i=0,o=t.length;i<o;i++)r.push(this.transformString(t[i]))}getItemString(t,n){const{name:r,path:i}=n;return i?i.reduce((o,a)=>o&&o[a],t):t[r]}transformString(t){return t.toLocaleLowerCase()}compareScoredStrings(t,n){const r=t._,i=n._,o=typeof r=="string"?r:r[this.defaultKeyName],a=typeof i=="string"?i:i[this.defaultKeyName];return t.score===n.score?o===void 0||a===void 0?o===void 0&&a===void 0?0:o===void 0?1:-1:o===a?0:o<a?-1:1:n.score-t.score}}function fde(e,t,n){const[r,i]=h.useState(void 0),[o,a]=h.useState([]),s=be();let u=Uh(t||[]);const l=Wh(e,40);t===void 0&&(u=s.resources);const d=Wh(u,100);return h.useEffect(()=>{n||i(pde(d))},[d,n]),h.useEffect(()=>{if(n||r===void 0||bn.isValidSubject(l))return;const f=r&&r.search(l);a(f)},[l,r,n]),o}function pde(e){const n=Array.from((e==null?void 0:e.values())||[]).reduce((o,a)=>{if(!a.isReady()||a.getSubject()===void 0||a.getClasses().includes(F.classes.commit))return o;const s=JSON.stringify(Array.from(a.getPropVals().values()).sort().join(`
`)),u={subject:a.getSubject(),valuesArray:s};return o.push(u),o},[]),r={keys:["subject","valuesArray"]};return new dde(n,r)}function hde({subject:e,clickable:t,className:n}){const r=ae(e),[i]=nt(r);let[o]=re(r,F.properties.description);if(r.loading)return c.jsx("span",{about:e,children:"Loading..."});if(r.error)return c.jsxs(gt,{about:e,children:["Error: ",r.error.message]});const a=40;return o&&o.length>=a&&(o=o.slice(0,a)+"..."),c.jsxs("span",{about:e,className:n,children:[t?c.jsx(Ft,{untabbable:!0,subject:e,basic:!0}):c.jsx("b",{children:i}),c.jsx(Z2,{children:o?` - ${o}`:null})]})}const Z2=A.span.withConfig({displayName:"ResourceLine__ResourceLineDescription",componentId:"sc-6babed8d-0"})(["color:",";"],e=>e.theme.colors.textLight);function mde({subject:e}){const t=ae(e,{allowIncomplete:!0}),n=!(t.error||t.loading);return c.jsx(gde,{valid:n,children:t.title})}const gde=A.span.withConfig({displayName:"InlineOverlay__Wrapper",componentId:"sc-62e3ec7a-0"})(["margin-left:1px;color:",";"],e=>e.valid?e.theme.colors.main:"currentColor");function E_(e){return(e==null?void 0:e.type)==="createOption"}const vde=({required:e,initial:t,placeholder:n,onRemove:r,onUpdate:i,options:o,disabled:a,classType:s,onCreateClick:u,onInputChange:l,onBlur:d,invalid:f,...m})=>{const[g,y]=h.useState(t||""),[v,_]=h.useState(t),[x,S]=h.useState(0),[C,p]=h.useState(!1),[w,b]=h.useState(!1),[k,E]=h.useState(!1),I=h.useRef(null),j=h.useRef(null),P=h.useRef(null),B=h.useContext(pg),W=h.useRef(null),{above:D,below:L,width:T}=KA(C,W),V=h.useCallback(()=>{p(!1),b(!1),d==null||d(),_(g)},[d,g]);Wx([I,j,P],V,C),h.useEffect(()=>{b(!1),_(t)},[t]),Me("esc",se=>{se.preventDefault(),p(!1)},{enabled:C,enableOnTags:["INPUT"]});const H=h.useCallback(se=>{const z=se.target.value;y(z),l&&l(z),E(!0),b(!0),p(!0),S(-1),_(z===""?void 0:z)},[l,y]);function q(){var se;y(""),_(void 0),i(void 0),(se=P.current)==null||se.focus()}function N(se){S(-1),b(!0),p(!0),se.target.select(),setTimeout(function(){se.target.select()},20)}const J=h.useCallback(se=>{y(se),_(se),i(se),p(!1),b(!1)},[y,_,i,p]);return c.jsx(t3,{open:C,children:c.jsxs(wde,{children:[c.jsx(BR,{children:c.jsxs(ht,{ref:W,children:[c.jsxs(bde,{children:[v&&!w&&c.jsx(kde,{children:f?c.jsx(gt,{children:v}):c.jsx(mde,{subject:v})}),c.jsx(wt,{onFocus:N,disabled:a,size:5,required:e,placeholder:n,value:g,onChange:H,ref:P,...m})]}),v?c.jsx(us,{disabled:a,type:"button",onClick:q,title:"clear selection","aria-label":"clear selection",children:c.jsx(lo,{})}):null,o.length>0&&v===void 0&&c.jsx(us,{disabled:a,type:"button",onClick:()=>p(!C),title:"toggle menu",ref:j,"aria-label":"toggle menu",children:c.jsx(M9,{})}),r!==void 0&&c.jsx(us,{disabled:a,type:"button",onClick:r,title:"remove item","aria-label":"remove item",children:c.jsx(Ls,{})})]})}),c.jsx(n3,{container:B.current,children:c.jsx(r3,{collisionPadding:2,sideOffset:8,children:c.jsx("div",{onMouseEnter:()=>E(!1),children:C&&c.jsx(yde,{options:o,dropdownRef:I,selectedIndex:x,setSelectedIndex:S,onCreateClick:u,isOpen:C,useKeys:k,setUseKeys:E,inputValue:g,classType:s,maxHeight:Math.max(D,L),width:T,onItemSelect:J})})})})]})})};function yde({dropdownRef:e,inputValue:t,isOpen:n,onCreateClick:r,options:i,selectedIndex:o,setSelectedIndex:a,setUseKeys:s,useKeys:u,classType:l,maxHeight:d,width:f,onItemSelect:m}){const g=h.useRef(null),y=fde(t,i),_=[...r&&!t.startsWith("http")?[{type:"createOption"}]:[],...y],x=ae(l),[S]=nt(x);return Me("enter",C=>{C.preventDefault();const p=_[o];if(E_(p)){r&&r();return}o>0?m(p.item.subject):m(t)},{enabled:n,enableOnTags:["INPUT"]},[o]),Me("up",C=>{C.preventDefault(),s(!0);const p=o<=0?_.length-1:o-1;a(p)},{enabled:n,enableOnTags:["INPUT"]},[o]),Me("down",C=>{C.preventDefault(),s(!0);const p=o===_.length-1?0:o+1;return a(p),!1},{enabled:n,enableOnTags:["INPUT"]},[o]),h.useEffect(()=>{var C;(C=g.current)==null||C.scrollIntoView({block:"nearest"})},[o]),!_||_.length===0?null:c.jsx(Sde,{ref:e,height:d,width:f,children:c.jsx(xde,{height:d,children:_.map((C,p)=>E_(C)?c.jsxs(R_,{onClick:r,useKeys:u,selected:p===o,ref:p===o?g:null,children:["Create ",l?S:"new item",":"," ",c.jsx(_de,{children:t})]},t):c.jsx(R_,{onClick:()=>m(C.item.subject),selected:p===o,useKeys:u,ref:p===o?g:null,children:c.jsx(hde,{subject:C.item.subject})},C.item.subject))})})}const bde=A.div.withConfig({displayName:"DropdownInput__ResourceInputOverlayWrapper",componentId:"sc-ab239acc-0"})(["position:relative;display:flex;flex:1;"]),wde=A.div.withConfig({displayName:"DropdownInput__DropDownStyled",componentId:"sc-ab239acc-1"})(["position:relative;flex:1;"]),xde=A(Hs).withConfig({displayName:"DropdownInput__StyledScrollArea",componentId:"sc-ab239acc-2"})(["height:min(calc(","px - 2rem),30rem);width:var(--dropdown-width);overflow-x:hidden;"],e=>e.height),Sde=A.ul.withConfig({displayName:"DropdownInput__DropDownWrapper",componentId:"sc-ab239acc-3"})(["display:flex;flex-direction:column;background-color:",";border:solid 1px ",";border-radius:",";box-shadow:",";max-height:min(calc(","px - 2rem),30rem);contain:paint;--dropdown-width:","px;width:var(--dropdown-width);min-width:10rem;"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.boxShadowSoft,e=>e.height,e=>e.width),R_=A.li.withConfig({displayName:"DropdownInput__DropDownItem",componentId:"sc-ab239acc-4"})(["display:flex;width:var(--dropdown-width);overflow-x:hidden;flex-direction:row;border-bottom:solid 1px ",";cursor:pointer;margin:0;white-space:nowrap;padding:0.3rem;"," ",""],e=>e.theme.colors.bg2,e=>e.selected&&cn(["background-color:",";color:",";& ","{color:",";}"],t=>t.theme.colors.main,t=>t.theme.colors.bg,Z2,t=>t.theme.colors.bg),e=>!e.useKeys&&cn(["&:hover,&:active,&:focus{background-color:",";color:",";& ","{color:",";}}"],t=>t.theme.colors.main,t=>t.theme.colors.bg,Z2,t=>t.theme.colors.bg)),Cde=A.div.withConfig({displayName:"DropdownInput__DropDownMini",componentId:"sc-ab239acc-5"})(["display:inline-flex;margin-bottom:1rem;flex:1;max-width:20rem;"]),_de=A.span.withConfig({displayName:"DropdownInput__NewItemName",componentId:"sc-ab239acc-6"})(["font-style:italic;margin-left:1ch;"]),kde=A(RK).withConfig({displayName:"DropdownInput__StyledInputOverlay",componentId:"sc-ab239acc-7"})(["span{width:100%;height:2rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"]),ty=[{id:"cards",icon:c.jsx(wW,{})},{id:"table",icon:c.jsx(B9,{})}];function jde({resource:e}){const[t]=re(e,K.description),r=kX()<700?0:1,[i,o]=Di("CollectionDisplayStyle",r),[a]=Se(e,K.collection.members),[s]=re(e,K.collection.value),[u]=re(e,K.collection.property),[l]=ao(e,K.collection.currentPage),d=l||0,[f]=ao(e,K.collection.totalPages),m=f||1,[,g]=Jh("current_page"),[y,v]=Jh("sort_by"),_=ae(s),[x]=Se(_,K.requires),[S]=Se(_,K.recommends),C=x.concat(S),[p]=re(_,K.description),[w]=re(_,K.shortname),[b,k]=h.useState(!1),E=s&&u===K.isA,I=be();OA(()=>{I.fetchResourceFromServer(e.getSubject())});function j(){o(P())}function P(){let H=i+1;return H>=ty.length&&(H=0),H}function B(){if(d!==0){const H=d-1;g(H.toString())}}function W(){if(d!==m-1){const H=d+1;g(H.toString())}}function D(H){v(H)}const L=ty[i],T=ty[P()];Me("right",W,{},[d]),Me("left",B,{},[d]);const V=()=>c.jsxs(Le,{children:[c.jsx(ue,{subtle:!0,onClick:B,title:"previous page (left arrow)",disabled:d===0,children:c.jsx(ig,{})}),c.jsx(ue,{subtle:!0,onClick:W,title:"next page (right arrow)",disabled:d===m-1,"data-test":"next-page",children:c.jsx(D9,{})})]});return c.jsxs(_d,{children:[c.jsx(fo,{resource:e}),t&&c.jsx(It,{text:t}),c.jsxs(Pde,{children:[m>1&&c.jsx(V,{}),c.jsx(ue,{subtle:!0,onClick:j,title:`use ${T.id} view (v)`,children:T.icon}),E&&c.jsx(kd,{subtle:!0,icon:!0,klass:s,parent:e.getSubjectNoParams()}),E&&c.jsx(ue,{subtle:!0,onClick:()=>k(!b),title:b?`Hide ${w} info`:`Show ${w} info`,children:c.jsx(lg,{})}),E&&c.jsx(Cde,{children:c.jsx(vde,{placeholder:"sort by...",initial:y,options:C,onUpdate:D})})]}),b&&s&&c.jsxs(c.Fragment,{children:[c.jsx(Ve,{subject:s,children:c.jsx("h3",{children:w})}),c.jsx(It,{text:p||""})]}),a.length===0?s?c.jsx(kd,{klass:s,parent:e.getSubject()}):c.jsx(c.Fragment,{children:"empty"}):c.jsxs(c.Fragment,{children:[L.id==="cards"&&c.jsx(Ede,{members:a,subject:e.getSubject()}),L.id==="table"&&c.jsx(Jue,{resource:e,members:a,columns:C})]}),m>1&&c.jsx(V,{})]})}function Ede({members:e,subject:t}){return e.length===0?c.jsx("p",{children:"This collection is empty"}):c.jsx(Ade,{children:e.map((n,r)=>c.jsx(Rde,{children:c.jsx(Oc,{initialInView:r<10,subject:n},n)},t+" "+n+r))})}const Rde=A.div.withConfig({displayName:"CollectionPage__GridItem",componentId:"sc-3055f7aa-0"})(["margin:0;word-break:break-word;overflow:hidden;break-inside:avoid-column;margin-bottom:","rem;"],e=>e.theme.margin),Pde=A.div.withConfig({displayName:"CollectionPage__ButtonsBar",componentId:"sc-3055f7aa-1"})(["display:flex;flex-wrap:wrap;gap:","rem;"],e=>e.theme.margin),Ade=A.div.withConfig({displayName:"CollectionPage__Masonry",componentId:"sc-3055f7aa-2"})(["column-count:1;column-gap:","rem;overflow:visible;box-sizing:border-box;@supports (grid-template-rows:masonry){display:grid;grid-template-columns:repeat(1,1fr);grid-template-rows:masonry;grid-column-gap:","rem;}@media only screen and (min-width:600px){grid-template-columns:repeat(2,1fr);column-count:2;}@media only screen and (min-width:1000px){grid-template-columns:repeat(3,1fr);column-count:3;}@media only screen and (min-width:1400px){grid-template-columns:repeat(4,1fr);column-count:4;}"],e=>e.theme.margin,e=>e.theme.margin);function Ide({resource:e}){const[t]=nt(e),[n]=re(e,K.description),[r]=Se(e,K.endpoint.parameters),[i]=Se(e,K.endpoint.results),o=ae(void 0,{newResource:!0}),a=be(),s=xt();async function u(l){l&&l.preventDefault();const d=new URL(e.getSubject());await Promise.all(r.map(async f=>{const m=o.get(f);if(m!==void 0){const g=await a.getProperty(f);d.searchParams.set(g.shortname,m.toString())}})),s(mt(d.href))}return c.jsxs(Et,{children:[c.jsxs("h1",{children:[t," endpoint"]}),n&&c.jsx(It,{text:n}),c.jsx("form",{onSubmit:u,children:r.map(l=>c.jsx(Mr,{propertyURL:l,resource:o},l))}),c.jsx(ue,{onClick:u,children:"Go"}),i&&i.length===0?c.jsx("p",{children:"No hits"}):i.map(l=>c.jsx(Oc,{subject:l},l))]})}function Tde({resource:e}){const[t]=Se(e,K.subResources),{drive:n,setDrive:r}=Xe();return n||r(e.getSubject()),c.jsxs(Et,{children:[c.jsxs(Le,{children:[c.jsx(fo,{resource:e}),n!==e.getSubject()&&c.jsx(ue,{onClick:()=>r(e.getSubject()),children:"Set as current drive"})]}),c.jsx(Uo,{resource:e,propertyURL:K.description,datatype:Z.MARKDOWN}),c.jsxs(Gr,{children:[c.jsx("h3",{children:"resources:"}),c.jsxs(Pd,{children:[t.map(i=>c.jsx(Os,{children:c.jsx(Ft,{subject:i})},i)),c.jsx(Os,{children:c.jsxs(Ve,{path:Fe.new,children:[c.jsx(qn,{})," Create new resource"]})})]})]}),n.startsWith("http://localhost")&&c.jsx("p",{children:"You are running Atomic-Server on `localhost`, which means that it will not be available from any other machine than your current local device. If you want your Atomic-Server to be available from the web, you should set this up at a Domain on a server."})]})}function Ode({resource:e}){const[t,n]=h.useState(),[r]=re(e,K.redirect.destination),[i]=re(e,K.redirect.redirectAgent),o=xt(),{agent:a,setAgent:s}=Xe(),u=be(),l=hE();return h.useEffect(()=>{i&&a&&!a.subject&&(a.subject=i,lt.success(c.jsxs("div",{children:[c.jsx("p",{children:"New User created!"}),c.jsx(ue,{onClick:()=>o(Fe.agentSettings),children:"User Settings"})]}),{duration:6e3}),s(a)),r&&l!=="POP"&&u.fetchResourceFromServer(r).then(()=>{o(mt(r))}).catch(d=>{n(d)})},[i,a,r]),c.jsxs(Et,{children:[c.jsx(Uo,{resource:e,propertyURL:K.description}),c.jsx("h1",{children:"Redirect"}),c.jsx("p",{children:"This page should redirect you automatically (unless you have just pressed the back button)"}),t&&c.jsx(yd,{error:t}),c.jsx(Vs,{resource:e,except:[K.isA]})]})}function Dde({resource:e}){const[t]=ao(e,K.invite.usagesLeft),[n]=e9(e,K.invite.write),r=xt();hE();const{agent:i,setAgent:o}=Xe(),a=ae(i==null?void 0:i.subject),[s]=nt(a,15),u=i==null?void 0:i.subject;async function l(){const f=await YF(),m=new Lh(f.privateKey);o(m);const g=await m.getPublicKey();d(g)}function d(f){const m=new URL(e.getSubject());f?m.searchParams.set("public-key",f):m.searchParams.set("agent",u),r(mt(m.href))}return c.jsxs(Et,{children:[c.jsxs("h1",{children:["Invite to ",n?"edit":"view"]}),c.jsx(Uo,{resource:e,propertyURL:K.description}),t===0?c.jsx("em",{children:"Sorry, this Invite has no usages left. Ask for a new one."}):c.jsxs(Le,{children:[u?c.jsx(c.Fragment,{children:c.jsxs(ue,{"data-test":"accept-existing",onClick:()=>d(void 0),children:["Accept as ",s]})}):c.jsxs(c.Fragment,{children:[c.jsx(ue,{"data-test":"accept-new",onClick:l,children:"Accept as new user"}),c.jsx(ue,{"data-test":"accept-sign-in",onClick:()=>r(Fe.agentSettings),subtle:!0,children:"Sign in"})]}),t!==void 0&&c.jsxs("p",{children:["(",t," usages left)"]})]})]})}function Nde(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const _0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function h4(e){return"nodeType"in e}function sr(e){var t,n;return e?Dc(e)?e:h4(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function m4(e){const{Document:t}=sr(e);return e instanceof t}function cf(e){return Dc(e)?!1:e instanceof sr(e).HTMLElement}function Mde(e){return e instanceof sr(e).SVGElement}function Nc(e){return e?Dc(e)?e.document:h4(e)?m4(e)?e:cf(e)?e.ownerDocument:document:document:document}const yi=_0?h.useLayoutEffect:h.useEffect;function k0(e){const t=h.useRef(e);return yi(()=>{t.current=e}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function $de(){const e=h.useRef(null),t=h.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=h.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Od(e,t){t===void 0&&(t=[e]);const n=h.useRef(e);return yi(()=>{n.current!==e&&(n.current=e)},t),n}function uf(e,t){const n=h.useRef();return h.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function wm(e){const t=k0(e),n=h.useRef(null),r=h.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function xm(e){const t=h.useRef();return h.useEffect(()=>{t.current=e},[e]),t.current}let ny={};function df(e,t){return h.useMemo(()=>{if(t)return t;const n=ny[e]==null?0:ny[e]+1;return ny[e]=n,e+"-"+n},[e,t])}function NT(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[u,l]of s){const d=o[u];d!=null&&(o[u]=d+e*l)}return o},{...t})}}const Vl=NT(1),Dd=NT(-1);function Lde(e){return"clientX"in e&&"clientY"in e}function j0(e){if(!e)return!1;const{KeyboardEvent:t}=sr(e.target);return t&&e instanceof t}function Fde(e){if(!e)return!1;const{TouchEvent:t}=sr(e.target);return t&&e instanceof t}function Sm(e){if(Fde(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Lde(e)?{x:e.clientX,y:e.clientY}:null}const Na=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Na.Translate.toString(e),Na.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),P_="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zde(e){return e.matches(P_)?e:e.querySelector(P_)}const Bde={display:"none"};function Hde(e){let{id:t,value:n}=e;return le.createElement("div",{id:t,style:Bde},n)}const Ude={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function Wde(e){let{id:t,announcement:n}=e;return le.createElement("div",{id:t,style:Ude,role:"status","aria-live":"assertive","aria-atomic":!0},n)}function Vde(){const[e,t]=h.useState("");return{announce:h.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const MT=h.createContext(null);function $T(e){const t=h.useContext(MT);h.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function qde(){const[e]=h.useState(()=>new Set),t=h.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[h.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const Gde={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Kde={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Yde(e){let{announcements:t=Kde,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Gde}=e;const{announce:o,announcement:a}=Vde(),s=df("DndLiveRegion"),[u,l]=h.useState(!1);if(h.useEffect(()=>{l(!0)},[]),$T(h.useMemo(()=>({onDragStart(f){let{active:m}=f;o(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:g}=f;t.onDragMove&&o(t.onDragMove({active:m,over:g}))},onDragOver(f){let{active:m,over:g}=f;o(t.onDragOver({active:m,over:g}))},onDragEnd(f){let{active:m,over:g}=f;o(t.onDragEnd({active:m,over:g}))},onDragCancel(f){let{active:m,over:g}=f;o(t.onDragCancel({active:m,over:g}))}}),[o,t])),!u)return null;const d=le.createElement(le.Fragment,null,le.createElement(Hde,{id:r,value:i.draggable}),le.createElement(Wde,{id:s,announcement:a}));return n?Ln.createPortal(d,n):d}var on;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(on||(on={}));function Cm(){}function Lu(e,t){return h.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function LT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ui=Object.freeze({x:0,y:0});function FT(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Xde(e,t){const n=Sm(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function zT(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Qde(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function A_(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function BT(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function I_(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Jde=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=I_(t,t.left,t.top),o=[];for(const a of r){const{id:s}=a,u=n.get(s);if(u){const l=FT(I_(u),i);o.push({id:s,data:{droppableContainer:a,value:l}})}}return o.sort(zT)},HT=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=A_(t),o=[];for(const a of r){const{id:s}=a,u=n.get(s);if(u){const l=A_(u),d=i.reduce((m,g,y)=>m+FT(l[y],g),0),f=Number((d/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(zT)};function Zde(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const u=t.width*t.height,l=e.width*e.height,d=a*s,f=d/(u+l-d);return Number(f.toFixed(4))}return 0}const efe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const u=Zde(s,t);u>0&&i.push({id:a,data:{droppableContainer:o,value:u}})}}return i.sort(Qde)};function tfe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function UT(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ui}function nfe(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const rfe=nfe(1);function WT(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ife(e,t,n){const r=WT(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,u=e.left-a-(1-i)*parseFloat(n),l=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:l,right:u+d,bottom:l+f,left:u}}const ofe={ignoreTransform:!1};function Mc(e,t){t===void 0&&(t=ofe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=sr(e).getComputedStyle(e);l&&(n=ife(n,l,d))}const{top:r,left:i,width:o,height:a,bottom:s,right:u}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:u}}function T_(e){return Mc(e,{ignoreTransform:!0})}function afe(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function sfe(e,t){return t===void 0&&(t=sr(e).getComputedStyle(e)),t.position==="fixed"}function lfe(e,t){t===void 0&&(t=sr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function E0(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(m4(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!cf(i)||Mde(i)||n.includes(i))return n;const o=sr(e).getComputedStyle(i);return i!==e&&lfe(i,o)&&n.push(i),sfe(i,o)?n:r(i.parentNode)}return e?r(e):n}function VT(e){const[t]=E0(e,1);return t??null}function ry(e){return!_0||!e?null:Dc(e)?e:h4(e)?m4(e)||e===Nc(e).scrollingElement?window:cf(e)?e:null:null}function qT(e){return Dc(e)?e.scrollX:e.scrollLeft}function GT(e){return Dc(e)?e.scrollY:e.scrollTop}function ew(e){return{x:qT(e),y:GT(e)}}var mn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(mn||(mn={}));function KT(e){return!_0||!e?!1:e===document.scrollingElement}function YT(e){const t={x:0,y:0},n=KT(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const cfe={x:.2,y:.2};function ufe(e,t,n,r,i){let{top:o,left:a,right:s,bottom:u}=n;r===void 0&&(r=10),i===void 0&&(i=cfe);const{isTop:l,isBottom:d,isLeft:f,isRight:m}=YT(e),g={x:0,y:0},y={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!l&&o<=t.top+v.height?(g.y=mn.Backward,y.y=r*Math.abs((t.top+v.height-o)/v.height)):!d&&u>=t.bottom-v.height&&(g.y=mn.Forward,y.y=r*Math.abs((t.bottom-v.height-u)/v.height)),!m&&s>=t.right-v.width?(g.x=mn.Forward,y.x=r*Math.abs((t.right-v.width-s)/v.width)):!f&&a<=t.left+v.width&&(g.x=mn.Backward,y.x=r*Math.abs((t.left+v.width-a)/v.width)),{direction:g,speed:y}}function dfe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function XT(e){return e.reduce((t,n)=>Vl(t,ew(n)),Ui)}function ffe(e){return e.reduce((t,n)=>t+qT(n),0)}function pfe(e){return e.reduce((t,n)=>t+GT(n),0)}function QT(e,t){if(t===void 0&&(t=Mc),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);VT(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const hfe=[["x",["left","right"],ffe],["y",["top","bottom"],pfe]];class g4{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=E0(n),i=XT(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of hfe)for(const u of a)Object.defineProperty(this,u,{get:()=>{const l=s(r),d=i[o]-l;return this.rect[u]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Fu{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function mfe(e){const{EventTarget:t}=sr(e);return e instanceof t?e:Nc(e)}function iy(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var oi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(oi||(oi={}));function O_(e){e.preventDefault()}function gfe(e){e.stopPropagation()}var Qe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Qe||(Qe={}));const JT={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter]},vfe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class R0{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Fu(Nc(n)),this.windowListeners=new Fu(sr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oi.Resize,this.handleCancel),this.windowListeners.add(oi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(oi.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&QT(r),n(Ui)}handleKeyDown(t){if(j0(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=JT,coordinateGetter:a=vfe,scrollBehavior:s="smooth"}=i,{code:u}=t;if(o.end.includes(u)){this.handleEnd(t);return}if(o.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:l}=r.current,d=l?{x:l.left,y:l.top}:Ui;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const m=Dd(f,d),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const v of y){const _=t.code,{isTop:x,isRight:S,isLeft:C,isBottom:p,maxScroll:w,minScroll:b}=YT(v),k=dfe(v),E={x:Math.min(_===Qe.Right?k.right-k.width/2:k.right,Math.max(_===Qe.Right?k.left:k.left+k.width/2,f.x)),y:Math.min(_===Qe.Down?k.bottom-k.height/2:k.bottom,Math.max(_===Qe.Down?k.top:k.top+k.height/2,f.y))},I=_===Qe.Right&&!S||_===Qe.Left&&!C,j=_===Qe.Down&&!p||_===Qe.Up&&!x;if(I&&E.x!==f.x){const P=v.scrollLeft+m.x,B=_===Qe.Right&&P<=w.x||_===Qe.Left&&P>=b.x;if(B&&!m.y){v.scrollTo({left:P,behavior:s});return}B?g.x=v.scrollLeft-P:g.x=_===Qe.Right?v.scrollLeft-w.x:v.scrollLeft-b.x,g.x&&v.scrollBy({left:-g.x,behavior:s});break}else if(j&&E.y!==f.y){const P=v.scrollTop+m.y,B=_===Qe.Down&&P<=w.y||_===Qe.Up&&P>=b.y;if(B&&!m.x){v.scrollTo({top:P,behavior:s});return}B?g.y=v.scrollTop-P:g.y=_===Qe.Down?v.scrollTop-w.y:v.scrollTop-b.y,g.y&&v.scrollBy({top:-g.y,behavior:s});break}}this.handleMove(t,Vl(Dd(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}R0.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=JT,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function D_(e){return!!(e&&"distance"in e)}function N_(e){return!!(e&&"delay"in e)}class v4{constructor(t,n,r){var i;r===void 0&&(r=mfe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=Nc(a),this.documentListeners=new Fu(this.document),this.listeners=new Fu(r),this.windowListeners=new Fu(sr(a)),this.initialCoordinates=(i=Sm(o))!=null?i:Ui,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(oi.Resize,this.handleCancel),this.windowListeners.add(oi.DragStart,O_),this.windowListeners.add(oi.VisibilityChange,this.handleCancel),this.windowListeners.add(oi.ContextMenu,O_),this.documentListeners.add(oi.Keydown,this.handleKeydown),n){if(D_(n))return;if(N_(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(oi.Click,gfe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oi.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const u=(n=Sm(t))!=null?n:Ui,l=Dd(i,u);if(!r&&s){if(N_(s))return iy(l,s.tolerance)?this.handleCancel():void 0;if(D_(s))return s.tolerance!=null&&iy(l,s.tolerance)?this.handleCancel():iy(l,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(u)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Qe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const yfe={move:{name:"pointermove"},end:{name:"pointerup"}};class y4 extends v4{constructor(t){const{event:n}=t,r=Nc(n.target);super(t,yfe,r)}}y4.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const bfe={move:{name:"mousemove"},end:{name:"mouseup"}};var tw;(function(e){e[e.RightClick=2]="RightClick"})(tw||(tw={}));class ZT extends v4{constructor(t){super(t,bfe,Nc(t.event.target))}}ZT.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===tw.RightClick?!1:(r==null||r({event:n}),!0)}}];const oy={move:{name:"touchmove"},end:{name:"touchend"}};class eO extends v4{constructor(t){super(t,oy)}static setup(){return window.addEventListener(oy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(oy.move.name,t)};function t(){}}}eO.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var zu;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(zu||(zu={}));var _m;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_m||(_m={}));function wfe(e){let{acceleration:t,activator:n=zu.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=_m.TreeOrder,pointerCoordinates:u,scrollableAncestors:l,scrollableAncestorRects:d,delta:f,threshold:m}=e;const g=Sfe({delta:f,disabled:!o}),[y,v]=$de(),_=h.useRef({x:0,y:0}),x=h.useRef({x:0,y:0}),S=h.useMemo(()=>{switch(n){case zu.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case zu.DraggableRect:return i}},[n,i,u]),C=h.useRef(null),p=h.useCallback(()=>{const b=C.current;if(!b)return;const k=_.current.x*x.current.x,E=_.current.y*x.current.y;b.scrollBy(k,E)},[]),w=h.useMemo(()=>s===_m.TreeOrder?[...l].reverse():l,[s,l]);h.useEffect(()=>{if(!o||!l.length||!S){v();return}for(const b of w){if((r==null?void 0:r(b))===!1)continue;const k=l.indexOf(b),E=d[k];if(!E)continue;const{direction:I,speed:j}=ufe(b,E,S,t,m);for(const P of["x","y"])g[P][I[P]]||(j[P]=0,I[P]=0);if(j.x>0||j.y>0){v(),C.current=b,y(p,a),_.current=j,x.current=I;return}}_.current={x:0,y:0},x.current={x:0,y:0},v()},[t,p,r,v,o,a,JSON.stringify(S),JSON.stringify(g),y,l,w,d,JSON.stringify(m)])}const xfe={x:{[mn.Backward]:!1,[mn.Forward]:!1},y:{[mn.Backward]:!1,[mn.Forward]:!1}};function Sfe(e){let{delta:t,disabled:n}=e;const r=xm(t);return uf(i=>{if(n||!r||!i)return xfe;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[mn.Backward]:i.x[mn.Backward]||o.x===-1,[mn.Forward]:i.x[mn.Forward]||o.x===1},y:{[mn.Backward]:i.y[mn.Backward]||o.y===-1,[mn.Forward]:i.y[mn.Forward]||o.y===1}}},[n,t,r])}function Cfe(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return uf(i=>{var o;return t===null?null:(o=r??i)!=null?o:null},[r,t])}function _fe(e,t){return h.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Nd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Nd||(Nd={}));var nw;(function(e){e.Optimized="optimized"})(nw||(nw={}));const M_=new Map;function kfe(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=h.useState(null),{frequency:s,measure:u,strategy:l}=i,d=h.useRef(e),f=_(),m=Od(f),g=h.useCallback(function(x){x===void 0&&(x=[]),!m.current&&a(S=>S===null?x:S.concat(x.filter(C=>!S.includes(C))))},[m]),y=h.useRef(null),v=uf(x=>{if(f&&!n)return M_;if(!x||x===M_||d.current!==e||o!=null){const S=new Map;for(let C of e){if(!C)continue;if(o&&o.length>0&&!o.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const p=C.node.current,w=p?new g4(u(p),p):null;C.rect.current=w,w&&S.set(C.id,w)}return S}return x},[e,o,n,f,u]);return h.useEffect(()=>{d.current=e},[e]),h.useEffect(()=>{f||g()},[n,f]),h.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),h.useEffect(()=>{f||typeof s!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},s))},[s,f,g,...r]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:o!=null};function _(){switch(l){case Nd.Always:return!1;case Nd.BeforeDragging:return n;default:return!n}}}function b4(e,t){return uf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function jfe(e,t){return b4(e,t)}function Efe(e){let{callback:t,disabled:n}=e;const r=k0(t),i=h.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return h.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function P0(e){let{callback:t,disabled:n}=e;const r=k0(t),i=h.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return h.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Rfe(e){return new g4(Mc(e),e)}function $_(e,t,n){t===void 0&&(t=Rfe);const[r,i]=h.useReducer(s,null),o=Efe({callback(u){if(e)for(const l of u){const{type:d,target:f}=l;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=P0({callback:i});return yi(()=>{i(),e?(a==null||a.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[e]),r;function s(u){if(!e)return null;if(e.isConnected===!1){var l;return(l=u??n)!=null?l:null}const d=t(e);return JSON.stringify(u)===JSON.stringify(d)?u:d}}function Pfe(e){const t=b4(e);return UT(e,t)}const L_=[];function Afe(e){const t=h.useRef(e),n=uf(r=>e?r&&r!==L_&&e&&t.current&&e.parentNode===t.current.parentNode?r:E0(e):L_,[e]);return h.useEffect(()=>{t.current=e},[e]),n}function Ife(e){const[t,n]=h.useState(null),r=h.useRef(e),i=h.useCallback(o=>{const a=ry(o.target);a&&n(s=>s?(s.set(a,ew(a)),new Map(s)):null)},[]);return h.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(u=>{const l=ry(u);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,ew(l)]):null}).filter(u=>u!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(u=>{const l=ry(u);l==null||l.removeEventListener("scroll",i)})}},[i,e]),h.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Vl(o,a),Ui):XT(e):Ui,[e,t])}function F_(e,t){t===void 0&&(t=[]);const n=h.useRef(null);return h.useEffect(()=>{n.current=null},t),h.useEffect(()=>{const r=e!==Ui;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Dd(e,n.current):Ui}function Tfe(e){h.useEffect(()=>{if(!_0)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Ofe(e,t){return h.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function tO(e){return h.useMemo(()=>e?afe(e):null,[e])}const ay=[];function Dfe(e,t){t===void 0&&(t=Mc);const[n]=e,r=tO(n?sr(n):null),[i,o]=h.useReducer(s,ay),a=P0({callback:o});return e.length>0&&i===ay&&o(),yi(()=>{e.length?e.forEach(u=>a==null?void 0:a.observe(u)):(a==null||a.disconnect(),o())},[e]),i;function s(){return e.length?e.map(u=>KT(u)?r:new g4(t(u),u)):ay}}function nO(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return cf(t)?t:e}function Nfe(e){let{measure:t}=e;const[n,r]=h.useState(null),i=h.useCallback(l=>{for(const{target:d}of l)if(cf(d)){r(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),o=P0({callback:i}),a=h.useCallback(l=>{const d=nO(l);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[s,u]=wm(a);return h.useMemo(()=>({nodeRef:s,rect:n,setRef:u}),[n,s,u])}const Mfe=[{sensor:y4,options:{}},{sensor:R0,options:{}}],$fe={current:{}},lh={draggable:{measure:T_},droppable:{measure:T_,strategy:Nd.WhileDragging,frequency:nw.Optimized},dragOverlay:{measure:Mc}};class Bu extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Lfe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Cm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:lh,measureDroppableContainers:Cm,windowRect:null,measuringScheduled:!1},rO={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Cm,draggableNodes:new Map,over:null,measureDroppableContainers:Cm},ff=h.createContext(rO),iO=h.createContext(Lfe);function Ffe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bu}}}function zfe(e,t){switch(t.type){case on.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case on.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case on.DragEnd:case on.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case on.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Bu(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case on.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Bu(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case on.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Bu(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Bfe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=h.useContext(ff),o=xm(r),a=xm(n==null?void 0:n.id);return h.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!j0(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:u,node:l}=s;if(!u.current&&!l.current)return;requestAnimationFrame(()=>{for(const d of[u.current,l.current]){if(!d)continue;const f=zde(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function oO(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Hfe(e){return h.useMemo(()=>({draggable:{...lh.draggable,...e==null?void 0:e.draggable},droppable:{...lh.droppable,...e==null?void 0:e.droppable},dragOverlay:{...lh.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Ufe(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=h.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;yi(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const d=n(l),f=UT(d,r);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=VT(l);m&&m.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const A0=h.createContext({...Ui,scaleX:1,scaleY:1});var ia;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ia||(ia={}));const aO=h.memo(function(t){var n,r,i,o;let{id:a,accessibility:s,autoScroll:u=!0,children:l,sensors:d=Mfe,collisionDetection:f=efe,measuring:m,modifiers:g,...y}=t;const v=h.useReducer(zfe,void 0,Ffe),[_,x]=v,[S,C]=qde(),[p,w]=h.useState(ia.Uninitialized),b=p===ia.Initialized,{draggable:{active:k,nodes:E,translate:I},droppable:{containers:j}}=_,P=k?E.get(k):null,B=h.useRef({initial:null,translated:null}),W=h.useMemo(()=>{var Xt;return k!=null?{id:k,data:(Xt=P==null?void 0:P.data)!=null?Xt:$fe,rect:B}:null},[k,P]),D=h.useRef(null),[L,T]=h.useState(null),[V,H]=h.useState(null),q=Od(y,Object.values(y)),N=df("DndDescribedBy",a),J=h.useMemo(()=>j.getEnabled(),[j]),se=Hfe(m),{droppableRects:z,measureDroppableContainers:Ce,measuringScheduled:Ee}=kfe(J,{dragging:b,dependencies:[I.x,I.y],config:se.droppable}),ye=Cfe(E,k),Re=h.useMemo(()=>V?Sm(V):null,[V]),Oe=Ks(),rt=jfe(ye,se.draggable.measure);Ufe({activeNode:k?E.get(k):null,config:Oe.layoutShiftCompensation,initialRect:rt,measure:se.draggable.measure});const Pe=$_(ye,se.draggable.measure,rt),zt=$_(ye?ye.parentElement:null),dt=h.useRef({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:z,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:j,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),tn=j.getNodeFor((n=dt.current.over)==null?void 0:n.id),Tt=Nfe({measure:se.dragOverlay.measure}),Bt=(r=Tt.nodeRef.current)!=null?r:ye,Sn=b?(i=Tt.rect)!=null?i:Pe:null,un=!!(Tt.nodeRef.current&&Tt.rect),_i=Pfe(un?null:Pe),Zr=tO(Bt?sr(Bt):null),Vt=Afe(b?tn??ye:null),ei=Dfe(Vt),me=oO(g,{transform:{x:I.x-_i.x,y:I.y-_i.y,scaleX:1,scaleY:1},activatorEvent:V,active:W,activeNodeRect:Pe,containerNodeRect:zt,draggingNodeRect:Sn,over:dt.current.over,overlayNodeRect:Tt.rect,scrollableAncestors:Vt,scrollableAncestorRects:ei,windowRect:Zr}),De=Re?Vl(Re,I):null,St=Ife(Vt),qt=F_(St),Cn=F_(St,[Pe]),X=Vl(me,qt),ie=Sn?rfe(Sn,me):null,_e=W&&ie?f({active:W,collisionRect:ie,droppableRects:z,droppableContainers:J,pointerCoordinates:De}):null,qe=BT(_e,"id"),[$e,Ht]=h.useState(null),_n=un?me:Vl(me,Cn),kn=tfe(_n,(o=$e==null?void 0:$e.rect)!=null?o:null,Pe),cr=h.useCallback((Xt,Dn)=>{let{sensor:Kn,options:ji}=Dn;if(D.current==null)return;const ur=E.get(D.current);if(!ur)return;const jr=Xt.nativeEvent,dr=new Kn({active:D.current,activeNode:ur,event:jr,options:ji,context:dt,onStart(Er){const po=D.current;if(po==null)return;const fr=E.get(po);if(!fr)return;const{onDragStart:Ys}=q.current,Xs={active:{id:po,data:fr.data,rect:B}};Ln.unstable_batchedUpdates(()=>{Ys==null||Ys(Xs),w(ia.Initializing),x({type:on.DragStart,initialCoordinates:Er,active:po}),S({type:"onDragStart",event:Xs})})},onMove(Er){x({type:on.DragMove,coordinates:Er})},onEnd:Wo(on.DragEnd),onCancel:Wo(on.DragCancel)});Ln.unstable_batchedUpdates(()=>{T(dr),H(Xt.nativeEvent)});function Wo(Er){return async function(){const{active:fr,collisions:Ys,over:Xs,scrollAdjustedTranslate:hf}=dt.current;let ho=null;if(fr&&hf){const{cancelDrop:ti}=q.current;ho={activatorEvent:jr,active:fr,collisions:Ys,delta:hf,over:Xs},Er===on.DragEnd&&typeof ti=="function"&&await Promise.resolve(ti(ho))&&(Er=on.DragCancel)}D.current=null,Ln.unstable_batchedUpdates(()=>{x({type:Er}),w(ia.Uninitialized),Ht(null),T(null),H(null);const ti=Er===on.DragEnd?"onDragEnd":"onDragCancel";if(ho){const Qs=q.current[ti];Qs==null||Qs(ho),S({type:ti,event:ho})}})}}},[E]),kr=h.useCallback((Xt,Dn)=>(Kn,ji)=>{const ur=Kn.nativeEvent,jr=E.get(ji);if(D.current!==null||!jr||ur.dndKit||ur.defaultPrevented)return;const dr={active:jr};Xt(Kn,Dn.options,dr)===!0&&(ur.dndKit={capturedBy:Dn.sensor},D.current=ji,cr(Kn,Dn))},[E,cr]),at=_fe(d,kr);Tfe(d),yi(()=>{Pe&&p===ia.Initializing&&w(ia.Initialized)},[Pe,p]),h.useEffect(()=>{const{onDragMove:Xt}=q.current,{active:Dn,activatorEvent:Kn,collisions:ji,over:ur}=dt.current;if(!Dn||!Kn)return;const jr={active:Dn,activatorEvent:Kn,collisions:ji,delta:{x:X.x,y:X.y},over:ur};Ln.unstable_batchedUpdates(()=>{Xt==null||Xt(jr),S({type:"onDragMove",event:jr})})},[X.x,X.y]),h.useEffect(()=>{const{active:Xt,activatorEvent:Dn,collisions:Kn,droppableContainers:ji,scrollAdjustedTranslate:ur}=dt.current;if(!Xt||D.current==null||!Dn||!ur)return;const{onDragOver:jr}=q.current,dr=ji.get(qe),Wo=dr&&dr.rect.current?{id:dr.id,rect:dr.rect.current,data:dr.data,disabled:dr.disabled}:null,Er={active:Xt,activatorEvent:Dn,collisions:Kn,delta:{x:ur.x,y:ur.y},over:Wo};Ln.unstable_batchedUpdates(()=>{Ht(Wo),jr==null||jr(Er),S({type:"onDragOver",event:Er})})},[qe]),yi(()=>{dt.current={activatorEvent:V,active:W,activeNode:ye,collisionRect:ie,collisions:_e,droppableRects:z,draggableNodes:E,draggingNode:Bt,draggingNodeRect:Sn,droppableContainers:j,over:$e,scrollableAncestors:Vt,scrollAdjustedTranslate:X},B.current={initial:Sn,translated:ie}},[W,ye,_e,ie,E,Bt,Sn,z,j,$e,Vt,X]),wfe({...Oe,delta:I,draggingRect:ie,pointerCoordinates:De,scrollableAncestors:Vt,scrollableAncestorRects:ei});const ki=h.useMemo(()=>({active:W,activeNode:ye,activeNodeRect:Pe,activatorEvent:V,collisions:_e,containerNodeRect:zt,dragOverlay:Tt,draggableNodes:E,droppableContainers:j,droppableRects:z,over:$e,measureDroppableContainers:Ce,scrollableAncestors:Vt,scrollableAncestorRects:ei,measuringConfiguration:se,measuringScheduled:Ee,windowRect:Zr}),[W,ye,Pe,V,_e,zt,Tt,E,j,z,$e,Ce,Vt,ei,se,Ee,Zr]),Gn=h.useMemo(()=>({activatorEvent:V,activators:at,active:W,activeNodeRect:Pe,ariaDescribedById:{draggable:N},dispatch:x,draggableNodes:E,over:$e,measureDroppableContainers:Ce}),[V,at,W,Pe,x,N,E,$e,Ce]);return le.createElement(MT.Provider,{value:C},le.createElement(ff.Provider,{value:Gn},le.createElement(iO.Provider,{value:ki},le.createElement(A0.Provider,{value:kn},l)),le.createElement(Bfe,{disabled:(s==null?void 0:s.restoreFocus)===!1})),le.createElement(Yde,{...s,hiddenTextDescribedById:N}));function Ks(){const Xt=(L==null?void 0:L.autoScrollEnabled)===!1,Dn=typeof u=="object"?u.enabled===!1:u===!1,Kn=b&&!Xt&&!Dn;return typeof u=="object"?{...u,enabled:Kn}:{enabled:Kn}}}),Wfe=h.createContext(null),z_="button",Vfe="Droppable";function sO(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=df(Vfe),{activators:a,activatorEvent:s,active:u,activeNodeRect:l,ariaDescribedById:d,draggableNodes:f,over:m}=h.useContext(ff),{role:g=z_,roleDescription:y="draggable",tabIndex:v=0}=i??{},_=(u==null?void 0:u.id)===t,x=h.useContext(_?A0:Wfe),[S,C]=wm(),[p,w]=wm(),b=Ofe(a,t),k=Od(n);yi(()=>(f.set(t,{id:t,key:o,node:S,activatorNode:p,data:k}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const E=h.useMemo(()=>({role:g,tabIndex:v,"aria-disabled":r,"aria-pressed":_&&g===z_?!0:void 0,"aria-roledescription":y,"aria-describedby":d.draggable}),[r,g,v,_,y,d.draggable]);return{active:u,activatorEvent:s,activeNodeRect:l,attributes:E,isDragging:_,listeners:r?void 0:b,node:S,over:m,setNodeRef:C,setActivatorNodeRef:w,transform:x}}function lO(){return h.useContext(iO)}const qfe="Droppable",Gfe={timeout:25};function cO(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=df(qfe),{active:a,dispatch:s,over:u,measureDroppableContainers:l}=h.useContext(ff),d=h.useRef({disabled:n}),f=h.useRef(!1),m=h.useRef(null),g=h.useRef(null),{disabled:y,updateMeasurementsFor:v,timeout:_}={...Gfe,...i},x=Od(v??r),S=h.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{l(Array.isArray(x.current)?x.current:[x.current]),g.current=null},_)},[_]),C=P0({callback:S,disabled:y||!a}),p=h.useCallback((E,I)=>{C&&(I&&(C.unobserve(I),f.current=!1),E&&C.observe(E))},[C]),[w,b]=wm(p),k=Od(t);return h.useEffect(()=>{!C||!w.current||(C.disconnect(),f.current=!1,C.observe(w.current))},[w,C]),yi(()=>(s({type:on.RegisterDroppable,element:{id:r,key:o,disabled:n,node:w,rect:m,data:k}}),()=>s({type:on.UnregisterDroppable,key:o,id:r})),[r]),h.useEffect(()=>{n!==d.current.disabled&&(s({type:on.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,s]),{active:a,rect:m,isOver:(u==null?void 0:u.id)===r,node:w,over:u,setNodeRef:b}}function Kfe(e){let{animation:t,children:n}=e;const[r,i]=h.useState(null),[o,a]=h.useState(null),s=xm(n);return!n&&!r&&s&&i(s),yi(()=>{if(!o)return;const u=r==null?void 0:r.key,l=r==null?void 0:r.props.id;if(u==null||l==null){i(null);return}Promise.resolve(t(l,o)).then(()=>{i(null)})},[t,r,o]),le.createElement(le.Fragment,null,n,r?h.cloneElement(r,{ref:a}):null)}const Yfe={x:0,y:0,scaleX:1,scaleY:1};function Xfe(e){let{children:t}=e;return le.createElement(ff.Provider,{value:rO},le.createElement(A0.Provider,{value:Yfe},t))}const Qfe={position:"fixed",touchAction:"none"},Jfe=e=>j0(e)?"transform 250ms ease":void 0,Zfe=h.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:u,transform:l,transition:d=Jfe}=e;if(!s)return null;const f=i?l:{...l,scaleX:1,scaleY:1},m={...Qfe,width:s.width,height:s.height,top:s.top,left:s.left,transform:Na.Transform.toString(f),transformOrigin:i&&r?Xde(r,s):void 0,transition:typeof d=="function"?d(r):d,...u};return le.createElement(n,{className:a,style:m,ref:t},o)}),epe=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,u]of Object.entries(o.active))u!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,u));if(o!=null&&o.dragOverlay)for(const[s,u]of Object.entries(o.dragOverlay))u!==void 0&&r.node.style.setProperty(s,u);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[u,l]of Object.entries(i))n.node.style.setProperty(u,l);a!=null&&a.active&&n.node.classList.remove(a.active)}},tpe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Na.Transform.toString(t)},{transform:Na.Transform.toString(n)}]},npe={duration:250,easing:"ease",keyframes:tpe,sideEffects:epe({styles:{active:{opacity:"0"}}})};function rpe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return k0((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const u=s.node.current;if(!u)return;const l=nO(a);if(!l)return;const{transform:d}=sr(a).getComputedStyle(a),f=WT(d);if(!f)return;const m=typeof t=="function"?t:ipe(t);return QT(u,i.draggable.measure),m({active:{id:o,data:s.data,node:u,rect:i.draggable.measure(u)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function ipe(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...npe,...e};return o=>{let{active:a,dragOverlay:s,transform:u,...l}=o;if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},f={scaleX:u.scaleX!==1?a.rect.width*u.scaleX/s.rect.width:1,scaleY:u.scaleY!==1?a.rect.height*u.scaleY/s.rect.height:1},m={x:u.x-d.x,y:u.y-d.y,...f},g=i({...l,active:a,dragOverlay:s,transform:{initial:u,final:m}}),[y]=g,v=g[g.length-1];if(JSON.stringify(y)===JSON.stringify(v))return;const _=r==null?void 0:r({active:a,dragOverlay:s,...l}),x=s.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(S=>{x.onfinish=()=>{_==null||_(),S()}})}}let B_=0;function ope(e){return h.useMemo(()=>{if(e!=null)return B_++,B_},[e])}const ape=le.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:u,zIndex:l=999}=e;const{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:g,draggableNodes:y,droppableContainers:v,dragOverlay:_,over:x,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:p,windowRect:w}=lO(),b=h.useContext(A0),k=ope(f==null?void 0:f.id),E=oO(a,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:g,draggingNodeRect:_.rect,over:x,overlayNodeRect:_.rect,scrollableAncestors:C,scrollableAncestorRects:p,transform:b,windowRect:w}),I=b4(m),j=rpe({config:r,draggableNodes:y,droppableContainers:v,measuringConfiguration:S}),P=I?_.setRef:void 0;return le.createElement(Xfe,null,le.createElement(Kfe,{animation:j},f&&k?le.createElement(Zfe,{key:k,id:f.id,ref:P,as:s,activatorEvent:d,adjustScale:t,className:u,transition:o,rect:I,style:{zIndex:l,...i},transform:E},n):null))});function uO(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function spe(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Sp(e){return e!==null&&e>=0}function lpe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function cpe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const dO=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=uO(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Cp={scaleX:1,scaleY:1},upe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const s=(t=o[n])!=null?t:r;if(!s)return null;if(i===n){const l=o[a];return l?{x:0,y:n<a?l.top+l.height-(s.top+s.height):l.top-s.top,...Cp}:null}const u=dpe(o,i,n);return i>n&&i<=a?{x:0,y:-s.height-u,...Cp}:i<n&&i>=a?{x:0,y:s.height+u,...Cp}:{x:0,y:0,...Cp}};function dpe(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const fO="Sortable",pO=le.createContext({activeIndex:-1,containerId:fO,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:dO,disabled:{draggable:!1,droppable:!1}});function fpe(e){let{children:t,id:n,items:r,strategy:i=dO,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:u,over:l,measureDroppableContainers:d}=lO(),f=df(fO,n),m=s.rect!==null,g=h.useMemo(()=>r.map(b=>typeof b=="object"&&"id"in b?b.id:b),[r]),y=a!=null,v=a?g.indexOf(a.id):-1,_=l?g.indexOf(l.id):-1,x=h.useRef(g),S=!lpe(g,x.current),C=_!==-1&&v===-1||S,p=cpe(o);yi(()=>{S&&y&&d(g)},[S,g,y,d]),h.useEffect(()=>{x.current=g},[g]);const w=h.useMemo(()=>({activeIndex:v,containerId:f,disabled:p,disableTransforms:C,items:g,overIndex:_,useDragOverlay:m,sortedRects:spe(g,u),strategy:i}),[v,f,p.draggable,p.droppable,C,g,_,u,m,i]);return le.createElement(pO.Provider,{value:w},t)}const ppe=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return uO(n,r,i).indexOf(t)},hpe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:u,transition:l}=e;return!l||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===u},mpe={duration:200,easing:"ease"},hO="transform",gpe=Na.Transition.toString({property:hO,duration:0,easing:"linear"}),vpe={roleDescription:"sortable"};function ype(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=h.useState(null),s=h.useRef(n);return yi(()=>{if(!t&&n!==s.current&&r.current){const u=i.current;if(u){const l=Mc(r.current,{ignoreTransform:!0}),d={x:u.left-l.left,y:u.top-l.top,scaleX:u.width/l.width,scaleY:u.height/l.height};(d.x||d.y)&&a(d)}}n!==s.current&&(s.current=n)},[t,n,r,i]),h.useEffect(()=>{o&&a(null)},[o]),o}function bpe(e){let{animateLayoutChanges:t=hpe,attributes:n,disabled:r,data:i,getNewIndex:o=ppe,id:a,strategy:s,resizeObserverConfig:u,transition:l=mpe}=e;const{items:d,containerId:f,activeIndex:m,disabled:g,disableTransforms:y,sortedRects:v,overIndex:_,useDragOverlay:x,strategy:S}=h.useContext(pO),C=wpe(r,g),p=d.indexOf(a),w=h.useMemo(()=>({sortable:{containerId:f,index:p,items:d},...i}),[f,i,p,d]),b=h.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:k,node:E,isOver:I,setNodeRef:j}=cO({id:a,data:w,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:b,...u}}),{active:P,activatorEvent:B,activeNodeRect:W,attributes:D,setNodeRef:L,listeners:T,isDragging:V,over:H,setActivatorNodeRef:q,transform:N}=sO({id:a,data:w,attributes:{...vpe,...n},disabled:C.draggable}),J=Nde(j,L),se=!!P,z=se&&!y&&Sp(m)&&Sp(_),Ce=!x&&V,Ee=Ce&&z?N:null,Re=z?Ee??(s??S)({rects:v,activeNodeRect:W,activeIndex:m,overIndex:_,index:p}):null,Oe=Sp(m)&&Sp(_)?o({id:a,items:d,activeIndex:m,overIndex:_}):p,rt=P==null?void 0:P.id,Pe=h.useRef({activeId:rt,items:d,newIndex:Oe,containerId:f}),zt=d!==Pe.current.items,dt=t({active:P,containerId:f,isDragging:V,isSorting:se,id:a,index:p,items:d,newIndex:Pe.current.newIndex,previousItems:Pe.current.items,previousContainerId:Pe.current.containerId,transition:l,wasDragging:Pe.current.activeId!=null}),tn=ype({disabled:!dt,index:p,node:E,rect:k});return h.useEffect(()=>{se&&Pe.current.newIndex!==Oe&&(Pe.current.newIndex=Oe),f!==Pe.current.containerId&&(Pe.current.containerId=f),d!==Pe.current.items&&(Pe.current.items=d)},[se,Oe,f,d]),h.useEffect(()=>{if(rt===Pe.current.activeId)return;if(rt&&!Pe.current.activeId){Pe.current.activeId=rt;return}const Bt=setTimeout(()=>{Pe.current.activeId=rt},50);return()=>clearTimeout(Bt)},[rt]),{active:P,activeIndex:m,attributes:D,data:w,rect:k,index:p,newIndex:Oe,items:d,isOver:I,isSorting:se,isDragging:V,listeners:T,node:E,overIndex:_,over:H,setNodeRef:J,setActivatorNodeRef:q,setDroppableNodeRef:j,setDraggableNodeRef:L,transform:tn??Re,transition:Tt()};function Tt(){if(tn||zt&&Pe.current.newIndex===p)return gpe;if(!(Ce&&!j0(B)||!l)&&(se||dt))return Na.Transition.toString({...l,property:hO})}}function wpe(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function km(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const xpe=[Qe.Down,Qe.Right,Qe.Up,Qe.Left],Spe=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(xpe.includes(e.code)){if(e.preventDefault(),!n||!r)return;const u=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=i.get(f.id);if(m)switch(e.code){case Qe.Down:r.top<m.top&&u.push(f);break;case Qe.Up:r.top>m.top&&u.push(f);break;case Qe.Left:r.left>m.left&&u.push(f);break;case Qe.Right:r.left<m.left&&u.push(f);break}});const l=HT({active:n,collisionRect:r,droppableRects:i,droppableContainers:u,pointerCoordinates:null});let d=BT(l,"id");if(d===(a==null?void 0:a.id)&&l.length>1&&(d=l[1].id),d!=null){const f=o.get(n.id),m=o.get(d),g=m?i.get(m.id):null,y=m==null?void 0:m.node.current;if(y&&g&&f&&m){const _=E0(y).some((b,k)=>s[k]!==b),x=mO(f,m),S=Cpe(f,m),C=_||!x?{x:0,y:0}:{x:S?r.width-g.width:0,y:S?r.height-g.height:0},p={x:g.left,y:g.top};return C.x&&C.y?p:Dd(p,C)}}}};function mO(e,t){return!km(e)||!km(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Cpe(e,t){return!km(e)||!km(t)||!mO(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const H_="/",U_="?",_pe="[",kpe="#";function jpe({subject:e,deleteElement:t,index:n,setCurrent:r,setElementSubject:i,active:o,canDrag:a}){const s=ae(e,{newResource:!0}),[u,l]=h.useState(void 0),[d,f]=re(s,K.description,{commit:!0,handleValidationError:l,validate:!1}),[m]=Se(s,K.isA),g=h.useRef(null),[y,v]=Sr(s),_=m.length>0&&!m.includes(ft.elements.paragraph);function x(p){S(),l(void 0),f(p.target.value)}function S(){var p;(p=g.current)!=null&&p.style&&(g.current.style.height="0",g.current.style.height=g.current.scrollHeight+"px")}h.useEffect(()=>{S()},[g,d,o]),h.useEffect(()=>{var p,w;(p=g==null?void 0:g.current)==null||p.focus(),d&&((w=g==null?void 0:g.current)==null||w.setSelectionRange(d==null?void 0:d.length,d==null?void 0:d.length))},[o]),Me("backspace",p=>{(o&&(d===""||d===void 0)||o&&_)&&(p.preventDefault(),t(n))},{enableOnTags:["TEXTAREA"],enabled:o},[n,d,o]),Me(ot.deleteLine,p=>{o&&(p.preventDefault(),t(n))},{enableOnTags:["TEXTAREA"],enabled:o},[n,o]);function C(){return u!=null&&u.message?c.jsx(gt,{children:u.message}):o&&!y&&v?c.jsx(gt,{children:v}):null}return _?c.jsxs(ch,{canDrag:a,tabIndex:0,className:"element",active:o,onFocus:()=>r(n),onBlur:()=>r(-1),children:[c.jsx(Oc,{subject:e}),c.jsx(C,{})]}):o?c.jsxs(ch,{canDrag:a,active:o,onClick:()=>n&&r(n),children:[c.jsx(Rpe,{canDrag:a,"data-test":"element-input",className:"element",active:o,ref:g,onChange:x,onFocus:()=>r(n),onBlur:()=>r(-1),placeholder:`type something (try ${U_} or ${H_})`,autoFocus:o,value:d||""}),(d==null?void 0:d.startsWith(H_))&&c.jsx(Ppe,{query:d.substring(1),setElement:p=>n&&i(n,p)}),(d==null?void 0:d.startsWith(U_))&&c.jsx(Ape,{query:d.substring(1),setElement:p=>n&&i(n,p)}),(d==null?void 0:d.startsWith(_pe))&&c.jsx(ql,{children:c.jsx("p",{children:"[link text](https://example.com)"})}),(d==null?void 0:d.startsWith(kpe))&&c.jsxs(ql,{children:[c.jsx("p",{children:"# Big Header"}),c.jsx("p",{children:"## Header"}),c.jsx("p",{children:"### Smaller Header"})]}),c.jsx(C,{})]}):c.jsxs(ch,{canDrag:a,tabIndex:0,active:o,onFocus:()=>r(n),onBlur:()=>r(-1),children:[c.jsx(It,{text:d||"",noMargin:!0}),c.jsx(C,{})]})}function Epe({subject:e}){const t=ae(e),[n]=re(t,K.description);return c.jsx(ch,{children:c.jsx(It,{text:n||"",noMargin:!0})})}const rw=cn(["border-radius:5px;outline:none;"]),gO=cn(["line-height:1.4rem;font-family:",";font-size:","rem;"],e=>e.theme.fontFamily,e=>e.theme.fontSizeBody),ch=A.div.withConfig({displayName:"Element__ElementWrapper",componentId:"sc-9ca3690e-0"})(["position:relative;display:block;width:100%;border:none;resize:none;padding:0.5rem;padding-left:0rem;cursor:text;white-space:pre-line;display:flex;flex-direction:column;min-height:2.7rem;"," "," &:focus{","}"],e=>e.active&&e.canDrag&&rw,gO,rw),Rpe=A.textarea.withConfig({displayName:"Element__ElementView",componentId:"sc-9ca3690e-1"})([""," border:none;width:100%;resize:none;background-color:",";color:",";padding:0;margin-bottom:0.5rem;&:focus{outline:none;","}"],gO,e=>e.theme.colors.bg,e=>e.theme.colors.text,rw);function Ppe({query:e,setElement:t}){const{results:n}=qd(e),[r,i]=h.useState(0);return Me("tab,enter",o=>{o.preventDefault(),n[r]&&t(n[r])},{enableOnTags:["TEXTAREA"]},[]),Me("left",o=>{o.preventDefault();let a=r-1;a<0&&(a=n.length-1),i(r-1)},{enableOnTags:["TEXTAREA"]},[r]),Me("right",o=>{o.preventDefault();let a=r+1;a>n.length-1&&(a=0),i(r+1)},{enableOnTags:["TEXTAREA"]},[r]),e===""?c.jsx(ql,{children:c.jsx("p",{children:"Search something..."})}):n.length===0?c.jsx(ql,{children:c.jsx("p",{children:"No results"})}):c.jsxs(ql,{children:[c.jsx("p",{children:" (press tab to select, left / right to browse)"}),c.jsx("p",{children:c.jsx(Ft,{subject:n[r]})})]})}const ql=A.div.withConfig({displayName:"Element__WidgetWrapper",componentId:"sc-9ca3690e-2"})(["position:absolute;top:100%;right:0;left:-1rem;border-radius:",";border:solid 1px ",";padding:","rem;padding-bottom:0;background-color:",";backdrop-filter:blur(6px);opacity:0.9;z-index:1;"],e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.margin,e=>e.theme.colors.bg1);function Ape({query:e}){return c.jsxs(ql,{children:[e&&c.jsx(It,{text:e}),c.jsx("p",{children:"Try typing these:"}),c.jsxs("p",{children:["links: ",c.jsx("code",{children:"[clickable link](https://example.com)"})]}),c.jsxs("p",{children:["styling:",c.jsx("code",{children:"**bold** and _cursive_"})]}),c.jsxs("p",{children:["headings:",c.jsx("code",{children:"## Header"})]})]})}function vO({parentResource:e,children:t,onFilesUploaded:n}){const{upload:r,isUploading:i,error:o}=O3(e),a=h.useRef(null),s=h.useCallback(async d=>{const f=await r(d);n==null||n(f)},[r]),{getRootProps:u,isDragActive:l}=Ug({onDrop:s});return h.useEffect(()=>{if(l&&a.current){const d=a.current.getBoundingClientRect();d.top<0&&(a.current.style.top=`calc(${Math.abs(d.top)}px + 1rem)`)}},[l]),c.jsxs(Ipe,{...u(),tabIndex:-1,children:[i&&c.jsx("p",{children:"Uploading..."}),o&&c.jsx(gn,{children:o.message}),t,l&&c.jsx(Ope,{ref:a,children:c.jsxs(Dpe,{children:[c.jsx(H9,{})," Drop files here to upload."]})})]})}const Ipe=A.div.withConfig({displayName:"FileDropzone__Root",componentId:"sc-1fa61e1-0"})(["height:100%;position:relative;"]),Tpe=$o(["from{opacity:0;backdrop-filter:blur(0px);}to{opacity:1;backdrop-filter:blur(10px);}"]),Ope=A.div.withConfig({displayName:"FileDropzone__VisualDropzone",componentId:"sc-1fa61e1-1"})(["position:absolute;inset:0;height:90vh;background-color:",";backdrop-filter:blur(10px);border:3px dashed ",";border-radius:",";display:grid;place-items:center;font-size:1.8rem;color:",";animation:0.1s "," ease-in;"],e=>e.theme.darkMode?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.8)",e=>e.theme.colors.textLight,e=>e.theme.radius,e=>e.theme.colors.textLight,Tpe),Dpe=A.div.withConfig({displayName:"FileDropzone__TextWrapper",componentId:"sc-1fa61e1-2"})(["display:flex;align-items:center;gap:1rem;padding:","rem;"],e=>e.theme.margin);function Npe({resource:e}){const[t]=Sr(e),[n,r]=h.useState(t);return h.useEffect(()=>{r(t)},[t]),c.jsx(Upe,{children:c.jsx(Fpe,{children:n?c.jsx(Mpe,{resource:e,setEditMode:r}):c.jsx($pe,{resource:e,setEditMode:r})})})}function Mpe({resource:e,setEditMode:t}){const[n,r]=Se(e,K.document.elements,{commit:!1,validate:!1,commitDebounce:0}),i=h.useRef(null),o=be(),a=h.useRef(null),[s,u]=h.useState(void 0),[l,d]=h.useState(0),f=LT(Lu(y4),Lu(R0,{coordinateGetter:Spe}));h.useEffect(()=>{d(n.length-1)},[]),h.useEffect(()=>{n.length===0&&m(0)},[JSON.stringify(n)]),Me("enter",p=>{p.preventDefault(),m(l+1)},{enableOnTags:["TEXTAREA"]},[l]),Me("enter",p=>{p.preventDefault(),m(0)},{enableOnTags:["INPUT"]},[l]),Me("up",p=>{var w;p.preventDefault(),!l||l===0?(w=i.current)==null||w.focus():g(l-1)},{enableOnTags:["TEXTAREA"]},[l]),Me("down",p=>{p.preventDefault(),document.activeElement===i.current?g(0):g(l+1)},{enableOnTags:["TEXTAREA","INPUT"]},[l]),Me(ot.moveLineUp,p=>{p.preventDefault(),_(l,l-1)},{enableOnTags:["TEXTAREA"]},[l]),Me(ot.moveLineDown,p=>{p.preventDefault(),_(l,l+1)},{enableOnTags:["TEXTAREA"]},[l]),Me("esc",p=>{p.preventDefault(),d(-1)},{enableOnTags:["TEXTAREA"]});async function m(p){const w=o.createSubject("element",e.getSubject()),b=[...n];b.splice(p,0,w);try{const k=new Fi(w,!0);await Promise.all([k.set(K.isA,[ft.elements.paragraph],o),k.set(K.parent,e.getSubject(),o),k.set(K.description,"",o)]),await r(b),g(p),await k.save(o),await e.save(o)}catch(k){u(k)}}function g(p){var b,k,E,I;p>n.length-1?p=n.length-1:p<0&&(p=0),d(p);let w=(k=(b=a==null?void 0:a.current)==null?void 0:b.children[p])==null?void 0:k.getElementsByClassName("element")[0];w||(w=(E=a==null?void 0:a.current)==null?void 0:E.children[p]),w?w.focus():(I=a.current)==null||I.focus()}async function y(p){if(n.length===1){r([]),g(0),e.save(o);return}n.splice(p,1),r([...n]),g(p-1),e.save(o)}async function v(p,w){n[p]=w,r(n),p===n.length-1?m(p+1):(g(p+1),e.save(o))}function _(p,w){const b=n[p];n.splice(p,1),n.splice(w,0,b),r([...n]),g(w),e.save(o)}function x(p){const{active:w,over:b}=p;if(w.id!==(b==null?void 0:b.id)){const k=n.indexOf(w.id.toString());if(!(b!=null&&b.id))return;const E=n.indexOf(b.id.toString());_(k,E)}}function S(p){lt.success("Upload succeeded!"),p.map(w=>n.push(w)),r([...n]),e.save(o)}async function C(){var b,k;const p=n[n.length-1];((k=(b=(await o.getResourceAsync(p)).get(K.description))==null?void 0:b.toString())==null?void 0:k.length)===0?g(n.length-1):m(n.length)}return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[c.jsx(fo,{parentRef:i,resource:e}),c.jsx(ue,{icon:!0,subtle:!0,onClick:()=>t(!1),title:"Read mode",children:c.jsx(vd,{})})]}),(s==null?void 0:s.message)&&c.jsx(gt,{children:s.message}),c.jsx(vO,{onFilesUploaded:S,parentResource:e,children:c.jsxs("div",{ref:a,children:[c.jsx(aO,{sensors:f,collisionDetection:Jde,onDragEnd:x,children:c.jsx(fpe,{items:[...n],strategy:upe,children:n.map((p,w)=>c.jsx(Lpe,{canDrag:!0,index:w,subject:p,deleteElement:y,setCurrent:d,current:l,setElementSubject:v,active:w===l},w+p))})}),c.jsx(zpe,{onClick:C})]})})]})}function $pe({resource:e,setEditMode:t}){const[n]=Se(e,K.document.elements),[r]=re(e,K.name);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[c.jsx("h1",{style:{flex:1},children:r}),c.jsx(ue,{"data-test":"document-edit",icon:!0,subtle:!0,onClick:()=>t(!0),title:"Edit mode",children:c.jsx(Ha,{})})]}),n.map(i=>c.jsx(Epe,{subject:i},i))]})}function Lpe(e){const{subject:t,active:n}=e,{attributes:r,listeners:i,setNodeRef:o,transform:a,transition:s}=bpe({id:t}),u={transform:Na.Transform.toString(a),transition:s};return c.jsxs(Bpe,{ref:o,style:u,children:[c.jsx(Hpe,{active:n,...r,...i}),c.jsx(jpe,{...e})]})}const Fpe=A.div.withConfig({displayName:"DocumentPage__DocumentContainer",componentId:"sc-43cb2544-0"})(["width:min(100%,","rem);margin:auto;display:flex;flex:1;flex-direction:column;padding:2rem;@media (max-width:","rem){padding:","rem;}"],e=>e.theme.containerWidth,e=>e.theme.containerWidth,e=>e.theme.margin),zpe=A.div.withConfig({displayName:"DocumentPage__NewLine",componentId:"sc-43cb2544-1"})(["height:20rem;flex:1;cursor:text;"]),Bpe=A.div.withConfig({displayName:"DocumentPage__SortableItemWrapper",componentId:"sc-43cb2544-2"})(["display:flex;flex-direction:row;position:relative;"]),Hpe=e=>c.jsx(Wpe,{...e,title:"Grab to re-order",children:c.jsx(iW,{})}),Upe=A.div.withConfig({displayName:"DocumentPage__FullPageWrapper",componentId:"sc-43cb2544-3"})(["background-color:",";display:flex;flex:1;flex-direction:column;min-height:",";box-sizing:border-box;"],e=>e.theme.colors.bg,e=>e.theme.heights.fullPage),Wpe=A.div.withConfig({displayName:"DocumentPage__SortHandleStyled",componentId:"sc-43cb2544-4"})(["width:1rem;flex:1;display:flex;align-items:center;opacity:",";position:absolute;left:-1rem;bottom:0;height:100%;cursor:grab;border:solid 1px transparent;border-radius:",";&:drop(active),&:focus,&:active{opacity:0.5;}&:hover{opacity:0.5;}"],e=>e.active?.3:0,e=>e.theme.radius);function I0({content:e,loading:t}){const[n,r]=h.useState(void 0);function i(){r(e),navigator.clipboard.writeText(e||""),lt.success("Copied to clipboard")}return c.jsx(Vpe,{"data-code-content":e,children:t?"loading...":c.jsxs(c.Fragment,{children:[e,c.jsx(ue,{subtle:!0,style:{position:"absolute",bottom:0,top:0,margin:0,right:0},onClick:i,title:n===e?"Copied!":"Copy to clipboard","data-test":"copy-response",children:n===e?c.jsx(BU,{}):c.jsx(Lx,{})})]})})}const Vpe=A.pre.withConfig({displayName:"CodeBlock__CodeBlockStyled",componentId:"sc-744a1727-0"})(["position:relative;background-color:",";border-radius:",";border:solid 1px ",";padding:0.3rem;font-family:monospace;width:100%;overflow-x:auto;"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.colors.bg2);function Gs({resource:e,prefix:t,link:n}){const[r]=nt(e);return c.jsxs(qpe,{children:[t&&`${t} `,n?c.jsx(Ve,{subject:e.getSubject(),children:r}):r]})}const qpe=A.h1.withConfig({displayName:"Title__H1",componentId:"sc-10f839c4-0"})(["margin-bottom:0;"]);function Gpe({resource:e}){const[t,n]=h.useState(void 0),r=be();return c.jsxs(Et,{about:e.getSubject(),children:[c.jsx(Gs,{resource:e}),c.jsx(c4,{resource:e}),c.jsx(Uo,{resource:e,propertyURL:K.description}),c.jsxs(Ne,{children:[c.jsx(Vs,{resource:e,except:u4,editable:!0,columns:!0}),c.jsxs(Le,{children:[c.jsx(kd,{icon:!0,klass:e.getSubject()}),c.jsx(ue,{subtle:!0,onClick:async()=>n(await dF(e,r)),children:"typescript interface"})]})]}),t&&c.jsx(I0,{content:t})]})}function Kpe({resource:e}){const{downloadFile:t,bytes:n}=w0(e),r=kc("(min-width: 600px)");return c.jsx(Is,{children:c.jsxs(Ne,{gap:"2rem",children:[c.jsxs(Le,{center:!0,justify:"space-between",children:[c.jsx(Ype,{resource:e}),r&&c.jsx(Jce,{downloadFile:t,fileSize:n}),!r&&c.jsx(bT,{downloadFile:t,fileSize:n})]}),c.jsx(Uo,{resource:e,propertyURL:K.description}),c.jsx(CT,{resource:e})]})})}const Ype=A(fo).withConfig({displayName:"FilePage__StyledEditableTitle",componentId:"sc-34cb5413-0"})(["margin:0;"]);function Xpe({resource:e}){const[t]=Se(e,K.chatRoom.messages),[n,r]=h.useState(""),i=be(),[o,a]=h.useState(void 0),s=h.useRef(null),u=h.useRef(null),[l,d]=h.useState(1);Me("enter",x=>{x.preventDefault(),g()},{enableOnTags:["TEXTAREA"]},[]),Me("escape",x=>{var S;(S=u==null?void 0:u.current)==null||S.blur()},{enableOnTags:["TEXTAREA"]},[]),h.useEffect(f,[t.length,e]);function f(){s.current&&(s.current.scrollTop=s.current.scrollHeight)}const m=n.length===0;async function g(x){const S=n;try{if(f(),r(""),x&&x.preventDefault(),!m){const C=i.createSubject("messages",e.getSubject()),p=new Fi(C,!0);await p.set(K.parent,e.getSubject(),i,!1),await p.set(K.isA,[ft.message],i,!1),await p.set(K.description,n,i,!1),await p.set(K.commit.createdAt,Vd(),i,!1),o&&await p.set(K.chatRoom.replyTo,o,i,!1),await p.save(i),a(void 0)}}catch(C){r(S),lt.error(C.message)}}const y=h.useCallback(v,[u]);function v(x){var S;a(x),(S=u==null?void 0:u.current)==null||S.focus()}function _(x){if(r(x.target.value),x.target.value===""){d(1);return}const S=x.target.style.overflow;x.target.style.overflow="scroll";const C=x.target.scrollHeight;x.target.style.overflow=S;const w=Math.ceil(C/30)-1;w!==l&&d(w)}return c.jsxs(rhe,{children:[c.jsx(fo,{resource:e}),c.jsx(ihe,{ref:s,children:c.jsx(xO,{subject:e.getSubject(),setReplyTo:y})}),o&&c.jsxs(Ad,{children:[c.jsx(yO,{subject:o}),c.jsx(ue,{icon:!0,subtle:!0,onClick:()=>a(void 0),children:c.jsx(lo,{})})]}),c.jsxs(nhe,{onSubmit:g,children:[c.jsx(the,{rows:l,ref:u,autoFocus:!0,value:n,onChange:_,placeholder:"type a message","data-test":"message-input"}),c.jsx(ehe,{title:"Send message [enter]",disabled:m,clean:!0,onClick:g,children:"Send"})]}),c.jsx(sm,{baseMargin:"2rem",position:"bottom"})]})}const Qpe=500,Jpe=h.memo(function({subject:t,setReplyTo:n}){const r=ae(t),[i]=re(r,K.description),[o]=oo(r,K.commit.lastCommit),[a]=oo(r,K.chatRoom.replyTo),s=xt();function u(){navigator.clipboard.writeText(t),lt.success("Copied message URL to clipboard")}function l(){navigator.clipboard.writeText(i||""),lt.success("Copied message text to clipboard")}return c.jsxs(Zpe,{about:t,children:[c.jsxs(bO,{children:[c.jsx(Tc,{commitSubject:o}),a&&c.jsx(yO,{subject:a}),c.jsxs(wO,{children:[c.jsx(ue,{icon:!0,subtle:!0,onClick:()=>s(cg(t)),title:"Edit message",children:c.jsx(uW,{})}),c.jsx(ue,{icon:!0,subtle:!0,onClick:()=>n(t),title:"Reply to this message",children:c.jsx(pW,{})}),c.jsx(ue,{icon:!0,subtle:!0,onClick:u,title:"Copy link to this message",children:c.jsx(aW,{})}),c.jsx(ue,{icon:!0,subtle:!0,onClick:l,title:"Copy message text",children:c.jsx(Lx,{})})]})]}),c.jsx(It,{noMargin:!0,text:i||"",maxLength:Qpe})]})}),W_=50;function yO({subject:e}){const t=ae(e),[n]=re(t,K.description),[r]=oo(t,K.commit.lastCommit),i=ae(r),[o]=oo(i,K.commit.signer);if(!t.isReady()||!i.isReady())return c.jsx(V_,{children:"loading..."});const a=n==null?void 0:n.substring(0,W_),s=n&&n.length>W_?"...":"";return c.jsxs(V_,{children:[c.jsx("span",{children:"to "}),c.jsx(Ft,{subject:o}),c.jsx(Ve,{subject:e,children:`: ${a}${s}`})]})}const V_=A.span.withConfig({displayName:"ChatRoomPage__MessageLineStyled",componentId:"sc-b52ca89f-0"})(["font-size:0.7rem;white-space:nowrap;overflow:hidden;flex:1;"]),bO=A.div.withConfig({displayName:"ChatRoomPage__MessageDetails",componentId:"sc-b52ca89f-1"})(["font-size:0.7rem;margin-bottom:0;opacity:0.4;display:flex;flex:1;"]),wO=A.div.withConfig({displayName:"ChatRoomPage__MessageActions",componentId:"sc-b52ca89f-2"})(["display:flex;align-self:flex-end;justify-content:flex-end;flex:1;opacity:0;margin-right:1rem;"]),Zpe=A.div.withConfig({displayName:"ChatRoomPage__MessageComponent",componentId:"sc-b52ca89f-3"})(["min-height:1.5rem;padding-bottom:0.5rem;padding-left:1rem;&:hover{background:",";& ","{opacity:1;}& ","{opacity:1;}}"],e=>e.theme.colors.bg,bO,wO),ehe=A(ue).withConfig({displayName:"ChatRoomPage__SendButton",componentId:"sc-b52ca89f-4"})(["padding-left:1rem;padding-right:1rem;color:",";background:",";&:disabled{cursor:default;display:auto;opacity:0.5;}"],e=>e.theme.colors.bg,e=>e.theme.colors.main),the=A.textarea.withConfig({displayName:"ChatRoomPage__MessageInput",componentId:"sc-b52ca89f-5"})(["color:",";background:none;flex:1;padding:0.5rem 1rem;border:"," solid 1px;border-right:none;line-height:inherit;min-height:2rem;max-height:50vh;font-family:",";"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,e=>e.theme.fontFamily),nhe=A.form.withConfig({displayName:"ChatRoomPage__MessageForm",componentId:"sc-b52ca89f-6"})(["display:flex;flex-basis:3rem;flex-direction:row;border-radius:",";background:",";view-transition-name:chat-input;> :first-child{border-top-left-radius:",";border-bottom-left-radius:",";}> :last-child{border-top-right-radius:",";border-bottom-right-radius:",";}"],e=>e.theme.radius,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius),rhe=A.div.withConfig({displayName:"ChatRoomPage__FullPageWrapper",componentId:"sc-b52ca89f-7"})(["display:flex;flex-direction:column;height:calc(100vh - 4rem);padding:1rem;flex:1;"]),ihe=A.div.withConfig({displayName:"ChatRoomPage__ScrollingContent",componentId:"sc-b52ca89f-8"})(["margin-left:-1rem;margin-right:-1rem;overflow-y:scroll;flex:1;"]);function xO({subject:e,setReplyTo:t}){const n=ae(e),[r]=Se(n,K.chatRoom.messages),[i]=re(n,K.chatRoom.nextPage);return n.isReady()?c.jsxs("div",{children:[i&&c.jsx(xO,{subject:i,setReplyTo:t}),r.map(o=>c.jsx(Jpe,{subject:o,setReplyTo:t},"message"+o))]}):c.jsx(c.Fragment,{children:"loading..."})}function ohe({resource:e}){const[t]=re(e,K.description),[n]=re(e,K.parent),[r]=re(e,K.commit.lastCommit);return c.jsxs(Et,{children:[c.jsxs("h3",{children:["Message in ",c.jsx(Ft,{subject:n})]}),c.jsx(l4,{children:c.jsx(Tc,{commitSubject:r})}),c.jsx(It,{text:t||""})]})}function ahe({preview:e,error:t,loading:n}){return n?c.jsx(iw,{children:"loading..."}):t?c.jsx(she,{error:t}):!e||e===""?c.jsx(iw,{children:"no preview..."}):c.jsx(lhe,{children:c.jsx(It,{renderGFM:!0,text:e})})}const she=({error:e})=>c.jsx(iw,{children:c.jsxs("div",{children:[c.jsx("p",{children:"Could not load preview 😞"}),c.jsx(gt,{style:{fontSize:"1rem"},children:e.message})]})}),iw=A.div.withConfig({displayName:"BookmarkPreview__CenterGrid",componentId:"sc-7558a2ea-0"})(["display:grid;height:min(80vh,1000px);width:100%;place-items:center;font-size:calc(clamp(1rem,5vw,2.4rem) + 0.1rem);"]),lhe=A(Et).withConfig({displayName:"BookmarkPreview__StyledContainerNarrow",componentId:"sc-7558a2ea-1"})(["max-width:85ch;"]),q_=new Map;function che(...e){for(const t of e){for(const[n,r]of Object.entries(t.classes))q_.set(r,n);for(const[n,r]of Object.entries(t.properties))q_.set(r,n)}}const uhe={classes:{class:"https://atomicdata.dev/classes/Class",property:"https://atomicdata.dev/classes/Property",agent:"https://atomicdata.dev/classes/Agent",datatype:"https://atomicdata.dev/classes/Datatype",ontology:"https://atomicdata.dev/class/ontology"},properties:{allowsOnly:"https://atomicdata.dev/properties/allowsOnly",classtype:"https://atomicdata.dev/properties/classtype",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",write:"https://atomicdata.dev/properties/write",publicKey:"https://atomicdata.dev/properties/publicKey",instances:"https://atomicdata.dev/properties/instances",properties:"https://atomicdata.dev/properties/properties",classes:"https://atomicdata.dev/properties/classes",isLocked:"https://atomicdata.dev/properties/isLocked"}},dhe={classes:{commit:"https://atomicdata.dev/classes/Commit"},properties:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"}},fhe={classes:{collection:"https://atomicdata.dev/classes/Collection"},properties:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value",sortBy:"https://atomicdata.dev/properties/collection/sortBy",sortDesc:"https://atomicdata.dev/properties/collection/sortDesc",includeExternal:"https://atomicdata.dev/properties/collection/includeExternal"}},phe={classes:{chatroom:"https://atomicdata.dev/classes/ChatRoom",document:"https://atomicdata.dev/classes/Document",bookmark:"https://atomicdata.dev/class/Bookmark",paragraph:"https://atomicdata.dev/classes/elements/Paragraph",message:"https://atomicdata.dev/classes/Message",importer:"https://atomicdata.dev/classes/Importer",folder:"https://atomicdata.dev/classes/Folder",article:"https://atomicdata.dev/classes/Article",displayStyle:"https://atomicdata.dev/class/DisplayStyle",dateFormat:"https://atomicdata.dev/classes/DateFormat",numberFormat:"https://atomicdata.dev/classes/NumberFormat",rangeProperty:"https://atomicdata.dev/classes/RangeProperty",floatRangeProperty:"https://atomicdata.dev/classes/FloatRangeProperty",formattedNumber:"https://atomicdata.dev/classes/FormattedNumber",selectProperty:"https://atomicdata.dev/classes/SelectProperty",formattedDate:"https://atomicdata.dev/classes/FormattedDate",table:"https://atomicdata.dev/classes/Table",tag:"https://atomicdata.dev/classes/Tag",currencyProperty:"https://atomicdata.dev/ontology/data-browser/class/currency-property"},properties:{subResources:"https://atomicdata.dev/properties/subresources",displayStyle:"https://atomicdata.dev/property/display-style",publishedAt:"https://atomicdata.dev/properties/published-at",elements:"https://atomicdata.dev/properties/documents/elements",messages:"https://atomicdata.dev/properties/messages",nextPage:"https://atomicdata.dev/properties/nextPage",replyTo:"https://atomicdata.dev/properties/replyTo",url:"https://atomicdata.dev/property/url",preview:"https://atomicdata.dev/property/preview",imageUrl:"https://atomicdata.dev/properties/imageUrl",max:"https://atomicdata.dev/properties/max",min:"https://atomicdata.dev/properties/min",maxFloat:"https://atomicdata.dev/properties/maxFloat",minFloat:"https://atomicdata.dev/properties/minFloat",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",dateFormat:"https://atomicdata.dev/properties/dateFormat",tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths",customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning",color:"https://atomicdata.dev/properties/color",emoji:"https://atomicdata.dev/properties/emoji",tags:"https://atomicdata.dev/properties/tags",currency:"https://atomicdata.dev/ontology/data-browser/property/currency"}},hhe={classes:{error:"https://atomicdata.dev/classes/Error",endpoint:"https://atomicdata.dev/classes/Endpoint",drive:"https://atomicdata.dev/classes/Drive",redirect:"https://atomicdata.dev/classes/Redirect",file:"https://atomicdata.dev/classes/File",invite:"https://atomicdata.dev/classes/Invite",endpointResponse:"https://atomicdata.dev/ontology/server/class/endpoint-response"},properties:{drives:"https://atomicdata.dev/properties/drives",results:"https://atomicdata.dev/properties/endpoint/results",property:"https://atomicdata.dev/properties/search/property",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent",agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write",filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments",createdBy:"https://atomicdata.dev/properties/createdBy",checksum:"https://atomicdata.dev/properties/checksum",internalId:"https://atomicdata.dev/properties/internalId",children:"https://atomicdata.dev/properties/children",parameters:"https://atomicdata.dev/properties/endpoint/parameters",destination:"https://atomicdata.dev/properties/destination",status:"https://atomicdata.dev/ontology/server/property/status",responseMessage:"https://atomicdata.dev/ontology/server/property/response-message"}};function mhe(){che(uhe,dhe,fhe,phe,hhe)}vc.sha512=e=>Promise.resolve(DE(e));var G_;(function(e){e.ATOMIC_URL="https://atomicdata.dev/datatypes/atomicURL",e.BOOLEAN="https://atomicdata.dev/datatypes/boolean",e.DATE="https://atomicdata.dev/datatypes/date",e.FLOAT="https://atomicdata.dev/datatypes/float",e.INTEGER="https://atomicdata.dev/datatypes/integer",e.MARKDOWN="https://atomicdata.dev/datatypes/markdown",e.RESOURCEARRAY="https://atomicdata.dev/datatypes/resourceArray",e.SLUG="https://atomicdata.dev/datatypes/slug",e.STRING="https://atomicdata.dev/datatypes/string",e.TIMESTAMP="https://atomicdata.dev/datatypes/timestamp",e.UNKNOWN="unknown-datatype"})(G_||(G_={}));var K_;(function(e){e.READ="read",e.WRITE="write"})(K_||(K_={}));var Y_;(function(e){e.ResourceSaved="resource-saved",e.ResourceRemoved="resource-removed",e.ResourceManuallyCreated="resource-manually-created",e.AgentChanged="agent-changed",e.Error="error"})(Y_||(Y_={}));const X_={allowsOnly:"https://atomicdata.dev/properties/allowsOnly",getAll:"https://atomicdata.dev/properties/?page_size=999",children:"https://atomicdata.dev/properties/children",classType:"https://atomicdata.dev/properties/classtype",createdBy:"https://atomicdata.dev/properties/createdBy",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",drives:"https://atomicdata.dev/properties/drives",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",paymentPointer:"https://atomicdata.dev/properties/paymentPointer",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",subResources:"https://atomicdata.dev/properties/subresources",write:"https://atomicdata.dev/properties/write",displayStyle:"https://atomicdata.dev/property/display-style",publishedAt:"https://atomicdata.dev/properties/published-at",agent:{publicKey:"https://atomicdata.dev/properties/publicKey"},collection:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value"},commit:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"},document:{elements:"https://atomicdata.dev/properties/documents/elements"},endpoint:{parameters:"https://atomicdata.dev/properties/endpoint/parameters",results:"https://atomicdata.dev/properties/endpoint/results"},search:{query:"https://atomicdata.dev/properties/search/query",limit:"https://atomicdata.dev/properties/search/limit",property:"https://atomicdata.dev/properties/search/property"},redirect:{destination:"https://atomicdata.dev/properties/destination",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent"},invite:{agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write"},file:{filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments"},chatRoom:{messages:"https://atomicdata.dev/properties/messages",nextPage:"https://atomicdata.dev/properties/nextPage",replyTo:"https://atomicdata.dev/properties/replyTo"},bookmark:{url:"https://atomicdata.dev/property/url",preview:"https://atomicdata.dev/property/preview",imageUrl:"https://atomicdata.dev/properties/imageUrl"},constraints:{max:"https://atomicdata.dev/properties/max",min:"https://atomicdata.dev/properties/min",maxFloat:"https://atomicdata.dev/properties/maxFloat",minFloat:"https://atomicdata.dev/properties/minFloat",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",dateFormat:"https://atomicdata.dev/properties/dateFormat"},table:{tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths"},ontology:{customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning"},color:"https://atomicdata.dev/properties/color",emoji:"https://atomicdata.dev/properties/emoji",classes:"https://atomicdata.dev/properties/classes",properties:"https://atomicdata.dev/properties/properties",instances:"https://atomicdata.dev/properties/instances"};mhe();var ow;(function(e){e.Unauthorized="Unauthorized",e.NotFound="NotFound",e.Server="Server",e.Client="Client"})(ow||(ow={}));class jm extends Error{constructor(t,n="Client"){super(t),Object.setPrototypeOf(this,jm.prototype),this.type=n,this.message=t;try{const i=JSON.parse(t)[X_.description];i&&(this.message=i)}catch{}this.message||(this.message=this.createMessage())}static fromResource(t){return new jm(t.get(X_.description).toString())}createMessage(){switch(this.type){case"Unauthorized":return"You don't have the rights to do this.";case"NotFound":return"404 Not found.";case"Server":return"500 Unknown server error.";default:return"Unknown error."}}}const Q_=new Map;function ghe(e,t=500){return(...r)=>{const i=Q_.get(e);i&&window.clearTimeout(i),Q_.set(e,window.setTimeout(()=>e(...r),t))}}async function vhe(e,t="",n){const r=new URL(Fe.fetchBookmark,n.getServerUrl()),i=new URLSearchParams({name:t,url:e});r.search=i.toString();const o=await fetch(r.toString(),{headers:{Accept:"application/json"}});if(o.status!==200)throw new jm(await o.text(),ow.Server);return await o.json()}const yhe=ghe((e,t,n,r,i,o,a,s,u,l)=>{h.startTransition(()=>{vhe(e,t,n).then(async d=>{await Promise.all([i(d.preview),o(d.name),u(d["image-url"]),l(d.description)]),a(void 0),s(!1),r.save(n)}).catch(d=>{console.error(d),a(d),s(!1)})})});function bhe(e){const t=be(),[n,r]=re(e,F.properties.bookmark.preview),[i]=re(e,F.properties.bookmark.url),[o,a]=re(e,F.properties.name),[s,u]=re(e,F.properties.bookmark.imageUrl),[l,d]=re(e,F.properties.description),[f,m]=h.useState(void 0),[g,y]=h.useState(!1),v=h.useCallback(_=>{try{new URL(_)}catch(x){m(x);return}y(!0),yhe(_,o,t,e,r,a,m,y,u,d)},[o,e,t]);return h.useEffect(()=>{e.isReady()&&n===void 0&&i&&v(i)},[n,e.isReady()]),{preview:n,error:f,update:v,loading:g}}function whe({resource:e}){const[t,n]=re(e,F.properties.bookmark.url,{commit:!0}),{preview:r,error:i,update:o,loading:a}=bhe(e),s=h.useCallback(async u=>{await n(u.target.value),o(u.target.value)},[n,o]);return c.jsx(c.Fragment,{children:c.jsxs(xhe,{children:[c.jsx(_d,{children:c.jsx(fo,{resource:e})}),c.jsx(She,{children:c.jsx(_d,{children:c.jsxs(_he,{children:[c.jsx(Che,{children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"https://example.com",value:t,onChange:s})})}),t?c.jsxs(d4,{to:t,variant:bm.Button,children:["Open site"," "]}):c.jsx(gt,{children:"No url"})]})})}),c.jsx(khe,{children:c.jsx(ahe,{preview:r||"",error:i,loading:a})})]})})}const xhe=A.div.withConfig({displayName:"BookmarkPage__Wrapper",componentId:"sc-fa50f2b6-0"})(["margin-top:","rem;position:relative;display:flex;flex-direction:column;min-height:100%;",",","{padding-bottom:unset;}"],e=>e.theme.margin,_d,Et),She=A.div.withConfig({displayName:"BookmarkPage__ControlWrapper",componentId:"sc-fa50f2b6-1"})(["position:sticky;top:0rem;background-color:",";border-bottom:solid 1px ",";padding:0rem;align-items:center;"],e=>e.theme.colors.bgBody,e=>e.theme.colors.bg2),Che=A.div.withConfig({displayName:"BookmarkPage__FieldWrapper",componentId:"sc-fa50f2b6-2"})(["flex:1;"]),_he=A.div.withConfig({displayName:"BookmarkPage__ControlBar",componentId:"sc-fa50f2b6-3"})(["display:flex;align-items:center;gap:","rem;margin-bottom:","rem;"],e=>e.theme.margin,e=>e.theme.margin),khe=A.div.withConfig({displayName:"BookmarkPage__PreviewWrapper",componentId:"sc-fa50f2b6-4"})(["background-color:",";flex:1;padding-bottom:",";"],e=>e.theme.colors.bg,e=>e.theme.heights.floatingSearchBarPadding);function SO({resource:e}){const t=h.useId(),[n,r]=h.useState(!1),[i,o]=or(),a=ae(i),[s,u]=h.useState(!1);e=a||e;const l=be(),[d,f]=h.useState(""),m=h.useCallback(async()=>{try{u(!0),await lz(l,d,{overwriteOutside:n,parent:i}),lt.success("Imported!"),u(!1)}catch(g){lt.error(g.message),u(!1)}},[i,d,n,l]);return c.jsxs(Et,{children:[c.jsx(Gs,{resource:e,prefix:"Import to",link:!0}),c.jsxs("p",{children:["Read more about how importing Atomic Data works"," ",c.jsx("a",{href:"https://docs.atomicdata.dev/create-json-ad.html",children:"in the docs"}),"."]}),c.jsxs(Ne,{children:[c.jsx(Hn,{label:"JSON-AD",children:c.jsx(ht,{children:c.jsx(jK,{rows:15,placeholder:"Paste your JSON-AD...",value:d,onChange:g=>f(g.target.value),children:d})})}),c.jsx(Rhe,{children:"Options"}),c.jsxs(Ehe,{children:[c.jsxs(jhe,{children:[c.jsx("input",{type:"checkbox",checked:n,onChange:g=>r(g.target.checked)}),"Overwrite resources that are outside the scope of the parent. Do this only if you trust the imported data."]}),c.jsx(Hn,{label:"Target parent",helper:"This URL will be used as the default Parent for imported resources.",required:!0,fieldId:t,children:c.jsx(ht,{children:c.jsx(wt,{id:t,required:!0,placeholder:"Enter subject",value:i,onChange:g=>o(g.target.value)})})})]}),d!==""&&c.jsx(ue,{"data-test":"import-post",disabled:!i,onClick:m,children:s?"Importing...":"Send JSON"})]})]})}const jhe=A.label.withConfig({displayName:"ImporterPage__Label",componentId:"sc-41949813-0"})(["display:flex;gap:1ch;align-items:center;"]),Ehe=A.div.withConfig({displayName:"ImporterPage__Group",componentId:"sc-41949813-1"})(["display:flex;padding:1rem;flex-direction:column;gap:1rem;border:1px solid ",";border-radius:",";"],e=>e.theme.colors.bg2,e=>e.theme.radius),Rhe=A.h2.withConfig({displayName:"ImporterPage__Header",componentId:"sc-41949813-2"})(["font-size:1.2rem;"]),Phe="0.2rem";function CO({resource:e}){const[t]=re(e,ve.properties.parent),{enableScope:n}=gg(e.getSubject());return c.jsx(Ahe,{"aria-label":"Breadcrumbs",children:c.jsxs(Le,{fullWidth:!0,center:!0,gap:"initial",children:[t?c.jsx(kO,{subject:t,depth:0}):c.jsx(_O,{subject:e.getSubject()}),c.jsx(Ohe,{children:e.title}),c.jsx(Dhe,{}),c.jsx(Nhe,{onClick:n,title:`Search in ${e.title}`,color:"textLight",children:c.jsx(Qd,{})})]})})}const Ahe=A.nav.withConfig({displayName:"Parent__ParentWrapper",componentId:"sc-a0f37b35-0"})(["height:",";padding-block:",";padding-inline:0.5rem;color:",";border-bottom:1px solid ",";background-color:",";display:flex;flex-direction:row;align-items:center;justify-content:flex-start;view-transition-name:breadcrumb-bar;"],e=>e.theme.heights.breadCrumbBar,Phe,e=>e.theme.colors.textLight2,e=>e.theme.colors.bg2,e=>e.theme.colors.bg),Ihe=4;function _O({subject:e}){const{drive:t,setDrive:n}=Xe(),r=ae(e,{allowIncomplete:!0}),[i]=nt(r),o=r.getClasses(),a=()=>{n(e)};return e&&e!==t&&o[0]===xa.classes.drive?c.jsx(ue,{title:`Set ${i} as current drive`,subtle:!0,onClick:a,children:"Set Drive"}):null}function kO({subject:e,depth:t}){const n=ae(e,{allowIncomplete:!0}),[r]=re(n,ve.properties.parent),i=Ua(),[o]=nt(n);if(t>Ihe)return c.jsx(J_,{children:"Set as drive"});function a(s){s.preventDefault(),i(mt(e))}return c.jsxs(c.Fragment,{children:[r?c.jsx(kO,{subject:r,depth:t+1}):c.jsx(_O,{subject:e}),c.jsx(J_,{href:e,onClick:a,children:o}),c.jsx(The,{children:"/"})]})}const The=A.div.withConfig({displayName:"Parent__Divider",componentId:"sc-a0f37b35-1"})(["padding:0.1rem 0.2rem;"]),jO=cn(["font-size:","rem;font-family:",";padding:0.1rem 0.5rem;color:",";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.theme.fontSizeBody,e=>e.theme.fontFamily,e=>e.theme.colors.textLight),Ohe=A.span.withConfig({displayName:"Parent__BreadCrumbCurrent",componentId:"sc-a0f37b35-2"})(["",""],jO),J_=A.a.withConfig({displayName:"Parent__Breadcrumb",componentId:"sc-a0f37b35-3"})([""," align-self:center;cursor:'pointer';text-decoration:none;border-radius:",";&:hover{background:",";color:",";}&:active{background:",";}"],jO,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.text,e=>e.theme.colors.bg2),Dhe=A.span.withConfig({displayName:"Parent__Spacer",componentId:"sc-a0f37b35-4"})(["flex:1;"]),Nhe=A(Wt).withConfig({displayName:"Parent__ScopedSearchButton",componentId:"sc-a0f37b35-5"})(["justify-self:flex-end;"]);function Mhe({options:e,name:t,onChange:n}){const[r,i]=h.useState(()=>{var a;return(a=e.find(s=>s.checked))==null?void 0:a.value}),o=h.useCallback((a,s)=>{a&&(n(s),i(s))},[n]);return c.jsx(Lhe,{children:e.map(a=>h.createElement($he,{...a,key:a.value,onChange:o,checked:r===a.value,name:t}))})}function $he({onChange:e,icon:t,label:n,name:r,value:i,checked:o}){const a=h.useId(),s=u=>{e(u.target.checked,i)};return c.jsxs(Fhe,{children:[c.jsx(Bhe,{id:a,type:"radio",onChange:s,name:r,value:i,checked:o}),c.jsx(zhe,{htmlFor:a,title:n,children:t})]})}const Lhe=A.form.withConfig({displayName:"ButtonGroup__Group",componentId:"sc-824692dd-0"})(["display:flex;height:2rem;gap:0.5rem;"]),Fhe=A.div.withConfig({displayName:"ButtonGroup__Item",componentId:"sc-824692dd-1"})(["position:relative;width:2rem;aspect-ratio:1/1;"]),zhe=A.label.withConfig({displayName:"ButtonGroup__Label",componentId:"sc-824692dd-2"})(["position:absolute;inset:0;width:100%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;border-radius:",";color:",";cursor:pointer;transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;input:checked + &{background-color:",";color:",";}:hover{background-color:",";}"],e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.colors.text,e=>e.theme.colors.bg1),Bhe=A.input.withConfig({displayName:"ButtonGroup__Input",componentId:"sc-824692dd-3"})(["position:absolute;inset:0;width:100%;aspect-ratio:1/1;visibility:hidden;"]),{grid:Z_,list:ek}=ft.displayStyles;function Hhe({displayStyle:e,onClick:t}){const n=h.useMemo(()=>[{icon:c.jsx(cW,{}),label:"List View",value:ek,checked:e===ek},{icon:c.jsx(xW,{}),label:"Grid View",value:Z_,checked:e===Z_}],[e]);return c.jsx(Mhe,{options:n,name:"display-style",onChange:t})}function aw({resource:e}){const[t]=re(e,K.description);return c.jsx(qs,{children:c.jsx(f4,{children:t})})}function Uhe({resource:e}){const[t]=re(e,K.bookmark.imageUrl);return t?c.jsx(qs,{children:c.jsx(Whe,{src:t,alt:""})}):c.jsx(aw,{resource:e})}const Whe=A.img.withConfig({displayName:"BookmarkGridItem__Image",componentId:"sc-ac064349-0"})(["width:100%;height:100%;object-fit:cover;object-position:center;"]);function Vhe({resource:e}){return c.jsx("ul",{children:[...e.getPropVals()].map(([t,n])=>c.jsx(qhe,{prop:t,val:n},t))})}function qhe({prop:e,val:t}){const n=ae(e),[r]=nt(n),[i]=oo(n,K.datatype),o=h.useMemo(()=>i===Ib.atomicUrl?c.jsx(EO,{val:t}):i===Ib.resourceArray?c.jsx(Yhe,{val:t}):c.jsx(c.Fragment,{children:t}),[t,i]);return c.jsxs(Khe,{children:[c.jsx(Ghe,{children:r}),": ",o]})}const Ghe=A.span.withConfig({displayName:"AllPropsSimple__Key",componentId:"sc-aa9f85ef-0"})(["font-weight:bold;"]),Khe=A.ul.withConfig({displayName:"AllPropsSimple__List",componentId:"sc-aa9f85ef-1"})(["list-style:none;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";"],e=>e.theme.colors.textLight);function Yhe({val:e}){return c.jsx(c.Fragment,{children:e.map((t,n)=>c.jsxs(c.Fragment,{children:[c.jsx(EO,{val:t},t),n===e.length-1?"":", "]}))})}function EO({val:e}){const t=ae(e),[n]=nt(t);return c.jsx(c.Fragment,{children:n})}function Xhe({resource:e}){return c.jsx(Qhe,{children:c.jsx(Vhe,{resource:e})})}const Qhe=A.div.withConfig({displayName:"DefaultGridItem__DefaultGridWrapper",componentId:"sc-b2e41399-0"})(["padding:","rem;pointer-events:none;"],e=>e.theme.margin);function Jhe({resource:e}){const[t]=Se(e,K.chatRoom.messages);return c.jsx(tme,{children:t.length>0?c.jsxs(c.Fragment,{children:[c.jsx(tk,{subject:t[t.length-2]}),c.jsx(tk,{subject:t[t.length-1],alignment:"right"})]}):c.jsx(f4,{children:"Empty Chat"})})}const tk=({subject:e,alignment:t})=>{const n=ae(e),[r]=oo(n,K.commit.lastCommit),i=ae(r),[o]=oo(i,K.commit.signer),a=ae(o),[s]=nt(a),[u]=re(n,K.description);return c.jsxs(Zhe,{alignment:t,children:[c.jsx(eme,{children:s}),c.jsx(RO,{children:u})]})},RO=A.div.withConfig({displayName:"ChatRoomGridItem__TextWrapper",componentId:"sc-658a3520-0"})(["background-color:",";padding:0.5rem;border-radius:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.text),Zhe=A.div.withConfig({displayName:"ChatRoomGridItem__MessageWrapper",componentId:"sc-658a3520-1"})(["padding-inline:","rem;width:100%;text-align:",";","{border-bottom-left-radius:",";border-bottom-right-radius:",";}"],e=>e.theme.margin,e=>e.alignment??"left",RO,e=>e.alignment!=="right"?"0":"15px",e=>e.alignment==="right"?"0":"15px"),eme=A.div.withConfig({displayName:"ChatRoomGridItem__CommitWrapper",componentId:"sc-658a3520-2"})(["color:",";padding-inline:0.5rem;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.theme.colors.textLight),tme=A(qs).withConfig({displayName:"ChatRoomGridItem__ChatWrapper",componentId:"sc-658a3520-3"})(["display:flex;flex-direction:column;justify-content:space-evenly;"]);function nme({resource:e}){const[t]=Se(e,K.document.elements),n=ae(t[0]),[r]=re(n,K.description);return c.jsx(qs,{children:c.jsx(f4,{children:c.jsx(It,{text:r??""})})})}function PO({src:e,style:t}){return e===void 0?c.jsx(ime,{children:"No preview available"}):c.jsx(qs,{children:c.jsx(rme,{src:e,alt:"",loading:"lazy",style:t})})}const rme=A.img.withConfig({displayName:"GridItemWithImage__Image",componentId:"sc-e6c63d74-0"})(["width:100%;height:100%;object-fit:cover;object-position:center;"]),ime=A(qs).withConfig({displayName:"GridItemWithImage__TextWrapper",componentId:"sc-e6c63d74-1"})(["display:grid;place-items:center;color:",";"],e=>e.theme.colors.textLight),ome=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/avif"]);function ame({resource:e}){const{downloadUrl:t,mimeType:n,bytes:r}=w0(e),i=s4(),o=wT(e.getSubject());return r>=i?c.jsx(nk,{children:"To large for preview"}):ome.has(n)?c.jsx(PO,{src:t,style:o}):ST(n)?c.jsx(sme,{downloadUrl:t,mimeType:n}):c.jsx(nk,{children:"No preview available"})}const nk=A(qs).withConfig({displayName:"FileGridItem__TextWrapper",componentId:"sc-db41f843-0"})(["display:grid;place-items:center;color:",";"],e=>e.theme.colors.textLight),sme=A(xT).withConfig({displayName:"FileGridItem__StyledTextPreview",componentId:"sc-db41f843-1"})(["padding:","rem;color:",";&:is(pre){padding:0;padding-inline:","rem;}"],e=>e.theme.margin,e=>e.theme.colors.textLight,e=>e.theme.margin);function lme({resource:e}){const[t]=oo(e,PT.properties.coverImage),n=ae(t);return c.jsx(PO,{src:n.props.downloadUrl})}const cme=new Map([[Be.classes.bookmark,Uhe],[ve.classes.class,aw],[ve.classes.property,aw],[Be.classes.chatroom,Jhe],[Be.classes.document,nme],[xa.classes.file,ame],[Be.classes.article,lme]]);function ume(e){return cme.get(e)??Xhe}function dme({subject:e}){const t=Ua(),n=ae(e),[r]=nt(n),[i]=re(n,ve.properties.isA),o=ae(i),[a]=nt(o),s=Fo(i??""),u=h.useCallback(m=>{m.preventDefault(),t(mt(e))},[e,t]),l=h.useMemo(()=>ume(i??""),[i]);if(i===void 0)return c.jsx(gme,{});const d=i===Be.classes.folder,f=d?void 0:e;return c.jsxs(Td,{onClick:u,href:e,children:[c.jsx(RT,{subject:f,children:r}),d?c.jsx(pme,{}):c.jsxs(Id,{subject:f,children:[c.jsxs(fme,{children:[c.jsx(s,{}),c.jsx("span",{children:a})]}),c.jsx(x0,{FallBackComponent:hme,children:c.jsx(l,{resource:n})})]})]})}const fme=A.div.withConfig({displayName:"ResourceGridItem__ClassBanner",componentId:"sc-b8d19497-0"})(["display:flex;background-color:",";border-top-left-radius:",";border-top-right-radius:",";align-items:center;gap:0.5rem;justify-content:center;padding-block:var(--card-banner-padding);color:",";border-bottom:1px solid ",";span{text-transform:capitalize;}"],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg2),pme=A(L9).withConfig({displayName:"ResourceGridItem__FolderIcon",componentId:"sc-b8d19497-1"})(["height:100%;width:100%;color:",";transition:color 0.1s ease-in-out;",":hover &{color:",";}"],e=>e.theme.colors.textLight,Td,e=>e.theme.colors.main),hme=({error:e})=>c.jsx(mme,{children:e.message}),mme=A.div.withConfig({displayName:"ResourceGridItem__GridItemErrorWrapper",componentId:"sc-b8d19497-2"})(["color:",";text-align:center;"],e=>e.theme.colors.alert),gme=A(hK).withConfig({displayName:"ResourceGridItem__Loader",componentId:"sc-b8d19497-3"})(["--loader-bg-to:",";height:unset;aspect-ratio:1/1;"],e=>e.theme.colors.bgBody);function vme({subResources:e,onNewClick:t,showNewButton:n}){return c.jsxs(yme,{children:[Array.from(e.values()).map(r=>c.jsx(dme,{subject:r.getSubject()},r.getSubject())),n&&c.jsxs(Td,{children:[c.jsx(bme,{as:"button",onClick:t,title:"Create new resource",children:c.jsx(qn,{})}),c.jsx(RT,{children:"New Resource"})]})]})}const yme=A.div.withConfig({displayName:"GridView__Grid",componentId:"sc-78fccaf3-0"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));width:var(--container-width);margin-inline:auto;gap:3rem;"]),bme=A(Id).withConfig({displayName:"GridView__NewCard",componentId:"sc-78fccaf3-1"})(["background-color:",";border:1px solid ",";cursor:pointer;display:grid;place-items:center;font-size:3rem;color:",";transition:color 0.1s ease-in-out,font-size 0.1s ease-out,box-shadow 0.1s ease-in-out;",":hover &,",":focus &{color:",";font-size:3.8rem;}:active{font-size:3rem;}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,Td,Td,e=>e.theme.colors.main);function AO({subResources:e,onNewClick:t,showNewButton:n}){return c.jsxs(Cme,{children:[c.jsx(_me,{"data-test":"folder-list",children:c.jsxs(c.Fragment,{children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:c.jsx(Eme,{children:"Title"})}),c.jsx(ik,{as:"th",children:"Class"}),c.jsx(rk,{as:"th",children:"Last Modified"})]})}),c.jsx("tbody",{children:Array.from(e.values()).map(r=>c.jsxs(Rme,{children:[c.jsx("td",{children:c.jsx(wme,{resource:r})}),c.jsx(ik,{children:c.jsx(Sme,{resource:r})}),c.jsx(rk,{children:c.jsx(xme,{resource:r})})]},r.getSubject()))})]})}),n&&c.jsx(Pme,{clean:!0,onClick:t,"data-test":"new-resource-folder",children:c.jsxs("span",{children:[c.jsx(qn,{})," New Resource"]})})]})}function wme({resource:e}){const[t]=nt(e),[n]=re(e,K.isA),r=Fo(n??"");return c.jsxs(jme,{children:[c.jsx(kme,{children:c.jsx(r,{})}),c.jsx(Ve,{subject:e.getSubject(),children:t})]})}function xme({resource:e}){const[t]=re(e,K.commit.lastCommit);return c.jsx(IO,{children:c.jsx(Tc,{commitSubject:t})})}function Sme({resource:e}){const[t]=re(e,K.isA),n=ae(t),[r]=nt(n);return c.jsx(IO,{children:c.jsx(Ve,{subject:t,children:r})})}const Cme=A.div.withConfig({displayName:"ListView__Wrapper",componentId:"sc-3817264e-0"})(["--icon-width:1rem;--icon-title-spacing:1rem;--cell-padding:0.4rem;width:var(--container-width);margin-inline:auto;"]),_me=A.table.withConfig({displayName:"ListView__StyledTable",componentId:"sc-3817264e-1"})(["text-align:left;border-collapse:collapse;width:100%;th{padding-bottom:1rem;}th:last-child{padding-right:2rem;}"]),kme=A.span.withConfig({displayName:"ListView__IconWrapper",componentId:"sc-3817264e-2"})(["width:var(--icon-width);display:inline-flex;align-items:center;"]),jme=A.div.withConfig({displayName:"ListView__TitleWrapper",componentId:"sc-3817264e-3"})(["display:flex;align-items:center;gap:var(--icon-title-spacing);svg{color:",";}"],e=>e.theme.colors.textLight),Eme=A.span.withConfig({displayName:"ListView__TitleHeaderWrapper",componentId:"sc-3817264e-4"})(["margin-inline-start:calc( var(--icon-width) + var(--icon-title-spacing) + var(--cell-padding) );"]),rk=A.td.withConfig({displayName:"ListView__AlignRight",componentId:"sc-3817264e-5"})(["text-align:right;"]),IO=A.span.withConfig({displayName:"ListView__LinkWrapper",componentId:"sc-3817264e-6"})(["a{color:",";}"],e=>e.theme.colors.textLight),Rme=A.tr.withConfig({displayName:"ListView__TableRow",componentId:"sc-3817264e-7"})(["&:nth-child(odd){td{background-color:",";}td:first-child{border-top-left-radius:",";border-bottom-left-radius:",";}td:last-child{border-top-right-radius:",";border-bottom-right-radius:",";}}td{padding:var(--cell-padding);}"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius),ik=A.td.withConfig({displayName:"ListView__ClassCell",componentId:"sc-3817264e-8"})(["@container (max-width:500px){display:none;}"]),Pme=A(ue).withConfig({displayName:"ListView__NewButton",componentId:"sc-3817264e-9"})(["margin-top:1rem;margin-inline-start:calc( var(--icon-width) + var(--icon-title-spacing) + var(--cell-padding) );> span{display:flex;align-items:center;gap:0.5rem;}"]),Ame={commit:!0},Ime=new Map([[ft.displayStyles.list,AO],[ft.displayStyles.grid,vme]]),Tme={commit:!0};function Ome({resource:e}){const[t]=Se(e,K.subResources,Tme),[n,r]=re(e,K.displayStyle,Ame),i=h.useMemo(()=>Ime.get(n)??AO,[n]),o=Uh(t),a=J9(e.getSubject()),[s]=Sr(e);return c.jsxs($me,{view:n,children:[c.jsx(Dme,{children:c.jsxs(Nme,{children:[c.jsx(fo,{resource:e}),c.jsx(Hhe,{onClick:r,displayStyle:n})]})}),c.jsx(Mme,{children:c.jsx(vO,{parentResource:e,children:c.jsx(i,{subResources:o,onNewClick:a,showNewButton:s})})})]})}const Dme=A.div.withConfig({displayName:"FolderPage__TitleBar",componentId:"sc-9b8a54f3-0"})(["padding:","rem;"],e=>e.theme.margin),Nme=A.div.withConfig({displayName:"FolderPage__TitleBarInner",componentId:"sc-9b8a54f3-1"})(["display:flex;width:var(--container-width);margin-inline:auto;justify-content:space-between;"]),Mme=A.div.withConfig({displayName:"FolderPage__Wrapper",componentId:"sc-9b8a54f3-2"})(["width:100%;padding:","rem;flex:1;"],e=>e.theme.margin),$me=A.div.withConfig({displayName:"FolderPage__FullPageWrapper",componentId:"sc-9b8a54f3-3"})(["--container-width:min(1300px,100%);min-height:",";padding-bottom:",";display:flex;flex-direction:column;"],e=>e.theme.heights.fullPage,e=>e.theme.heights.floatingSearchBarPadding);var ok=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Lme(e,t){return!!(e===t||ok(e)&&ok(t))}function Fme(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Lme(e[n],t[n]))return!1;return!0}function sy(e,t){t===void 0&&(t=Fme);var n,r=[],i,o=!1;function a(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return o&&n===this&&t(s,r)||(i=e.apply(this,s),o=!0,n=this,r=s),i}return a}var zme=typeof performance=="object"&&typeof performance.now=="function",ak=zme?function(){return performance.now()}:function(){return Date.now()};function sk(e){cancelAnimationFrame(e.id)}function Bme(e,t){var n=ak();function r(){ak()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ly=-1;function lk(e){if(e===void 0&&(e=!1),ly===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ly=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ly}var hl=null;function ck(e){if(e===void 0&&(e=!1),hl===null||e){var t=document.createElement("div"),n=t.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",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?hl="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?hl="negative":hl="positive-ascending"),document.body.removeChild(t),hl}return hl}var Hme=150,Ume=function(t,n){return t};function Wme(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,u=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(f){ng(m,f);function m(y){var v;return v=f.call(this,y)||this,v._instanceProps=u(v.props,hd(v)),v._outerRef=void 0,v._resetIsScrollingTimeoutId=null,v.state={instance:hd(v),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof v.props.initialScrollOffset=="number"?v.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},v._callOnItemsRendered=void 0,v._callOnItemsRendered=sy(function(_,x,S,C){return v.props.onItemsRendered({overscanStartIndex:_,overscanStopIndex:x,visibleStartIndex:S,visibleStopIndex:C})}),v._callOnScroll=void 0,v._callOnScroll=sy(function(_,x,S){return v.props.onScroll({scrollDirection:_,scrollOffset:x,scrollUpdateWasRequested:S})}),v._getItemStyle=void 0,v._getItemStyle=function(_){var x=v.props,S=x.direction,C=x.itemSize,p=x.layout,w=v._getItemStyleCache(l&&C,l&&p,l&&S),b;if(w.hasOwnProperty(_))b=w[_];else{var k=n(v.props,_,v._instanceProps),E=i(v.props,_,v._instanceProps),I=S==="horizontal"||p==="horizontal",j=S==="rtl",P=I?k:0;w[_]=b={position:"absolute",left:j?void 0:P,right:j?P:void 0,top:I?0:k,height:I?"100%":E,width:I?E:"100%"}}return b},v._getItemStyleCache=void 0,v._getItemStyleCache=sy(function(_,x,S){return{}}),v._onScrollHorizontal=function(_){var x=_.currentTarget,S=x.clientWidth,C=x.scrollLeft,p=x.scrollWidth;v.setState(function(w){if(w.scrollOffset===C)return null;var b=v.props.direction,k=C;if(b==="rtl")switch(ck()){case"negative":k=-C;break;case"positive-descending":k=p-S-C;break}return k=Math.max(0,Math.min(k,p-S)),{isScrolling:!0,scrollDirection:w.scrollOffset<C?"forward":"backward",scrollOffset:k,scrollUpdateWasRequested:!1}},v._resetIsScrollingDebounced)},v._onScrollVertical=function(_){var x=_.currentTarget,S=x.clientHeight,C=x.scrollHeight,p=x.scrollTop;v.setState(function(w){if(w.scrollOffset===p)return null;var b=Math.max(0,Math.min(p,C-S));return{isScrolling:!0,scrollDirection:w.scrollOffset<b?"forward":"backward",scrollOffset:b,scrollUpdateWasRequested:!1}},v._resetIsScrollingDebounced)},v._outerRefSetter=function(_){var x=v.props.outerRef;v._outerRef=_,typeof x=="function"?x(_):x!=null&&typeof x=="object"&&x.hasOwnProperty("current")&&(x.current=_)},v._resetIsScrollingDebounced=function(){v._resetIsScrollingTimeoutId!==null&&sk(v._resetIsScrollingTimeoutId),v._resetIsScrollingTimeoutId=Bme(v._resetIsScrolling,Hme)},v._resetIsScrolling=function(){v._resetIsScrollingTimeoutId=null,v.setState({isScrolling:!1},function(){v._getItemStyleCache(-1,null)})},v}m.getDerivedStateFromProps=function(v,_){return Vme(v,_),d(v),null};var g=m.prototype;return g.scrollTo=function(v){v=Math.max(0,v),this.setState(function(_){return _.scrollOffset===v?null:{scrollDirection:_.scrollOffset<v?"forward":"backward",scrollOffset:v,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(v,_){_===void 0&&(_="auto");var x=this.props,S=x.itemCount,C=x.layout,p=this.state.scrollOffset;v=Math.max(0,Math.min(v,S-1));var w=0;if(this._outerRef){var b=this._outerRef;C==="vertical"?w=b.scrollWidth>b.clientWidth?lk():0:w=b.scrollHeight>b.clientHeight?lk():0}this.scrollTo(o(this.props,v,_,p,this._instanceProps,w))},g.componentDidMount=function(){var v=this.props,_=v.direction,x=v.initialScrollOffset,S=v.layout;if(typeof x=="number"&&this._outerRef!=null){var C=this._outerRef;_==="horizontal"||S==="horizontal"?C.scrollLeft=x:C.scrollTop=x}this._callPropsCallbacks()},g.componentDidUpdate=function(){var v=this.props,_=v.direction,x=v.layout,S=this.state,C=S.scrollOffset,p=S.scrollUpdateWasRequested;if(p&&this._outerRef!=null){var w=this._outerRef;if(_==="horizontal"||x==="horizontal")if(_==="rtl")switch(ck()){case"negative":w.scrollLeft=-C;break;case"positive-ascending":w.scrollLeft=C;break;default:var b=w.clientWidth,k=w.scrollWidth;w.scrollLeft=k-b-C;break}else w.scrollLeft=C;else w.scrollTop=C}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&sk(this._resetIsScrollingTimeoutId)},g.render=function(){var v=this.props,_=v.children,x=v.className,S=v.direction,C=v.height,p=v.innerRef,w=v.innerElementType,b=v.innerTagName,k=v.itemCount,E=v.itemData,I=v.itemKey,j=I===void 0?Ume:I,P=v.layout,B=v.outerElementType,W=v.outerTagName,D=v.style,L=v.useIsScrolling,T=v.width,V=this.state.isScrolling,H=S==="horizontal"||P==="horizontal",q=H?this._onScrollHorizontal:this._onScrollVertical,N=this._getRangeToRender(),J=N[0],se=N[1],z=[];if(k>0)for(var Ce=J;Ce<=se;Ce++)z.push(h.createElement(_,{data:E,key:j(Ce,E),index:Ce,isScrolling:L?V:void 0,style:this._getItemStyle(Ce)}));var Ee=r(this.props,this._instanceProps);return h.createElement(B||W||"div",{className:x,onScroll:q,ref:this._outerRefSetter,style:pe({position:"relative",height:C,width:T,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},D)},h.createElement(w||b||"div",{children:z,ref:p,style:{height:H?"100%":Ee,pointerEvents:V?"none":void 0,width:H?Ee:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var v=this.props.itemCount;if(v>0){var _=this._getRangeToRender(),x=_[0],S=_[1],C=_[2],p=_[3];this._callOnItemsRendered(x,S,C,p)}}if(typeof this.props.onScroll=="function"){var w=this.state,b=w.scrollDirection,k=w.scrollOffset,E=w.scrollUpdateWasRequested;this._callOnScroll(b,k,E)}},g._getRangeToRender=function(){var v=this.props,_=v.itemCount,x=v.overscanCount,S=this.state,C=S.isScrolling,p=S.scrollDirection,w=S.scrollOffset;if(_===0)return[0,0,0,0];var b=a(this.props,w,this._instanceProps),k=s(this.props,b,w,this._instanceProps),E=!C||p==="backward"?Math.max(1,x):1,I=!C||p==="forward"?Math.max(1,x):1;return[Math.max(0,b-E),Math.max(0,Math.min(_-1,k+I)),b,k]},m}(h.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Vme=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},qme=Wme({getItemOffset:function(t,n){var r=t.itemSize;return n*r},getItemSize:function(t,n){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var n=t.itemCount,r=t.itemSize;return r*n},getOffsetForIndexAndAlignment:function(t,n,r,i,o,a){var s=t.direction,u=t.height,l=t.itemCount,d=t.itemSize,f=t.layout,m=t.width,g=s==="horizontal"||f==="horizontal",y=g?m:u,v=Math.max(0,l*d-y),_=Math.min(v,n*d),x=Math.max(0,n*d-y+d+a);switch(r==="smart"&&(i>=x-y&&i<=_+y?r="auto":r="center"),r){case"start":return _;case"end":return x;case"center":{var S=Math.round(x+(_-x)/2);return S<Math.ceil(y/2)?0:S>v+Math.floor(y/2)?v:S}case"auto":default:return i>=x&&i<=_?i:i<x?x:_}},getStartIndexForOffset:function(t,n){var r=t.itemCount,i=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(t,n,r){var i=t.direction,o=t.height,a=t.itemCount,s=t.itemSize,u=t.layout,l=t.width,d=i==="horizontal"||u==="horizontal",f=n*s,m=d?l:o,g=Math.ceil((m+r-f)/s);return Math.max(0,Math.min(a-1,n+g-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});let pi;typeof window<"u"?pi=window:typeof self<"u"?pi=self:pi=global;let sw=null,lw=null;const uk=20,cy=pi.clearTimeout,dk=pi.setTimeout,uy=pi.cancelAnimationFrame||pi.mozCancelAnimationFrame||pi.webkitCancelAnimationFrame,fk=pi.requestAnimationFrame||pi.mozRequestAnimationFrame||pi.webkitRequestAnimationFrame;uy==null||fk==null?(sw=cy,lw=function(t){return dk(t,uk)}):(sw=function([t,n]){uy(t),cy(n)},lw=function(t){const n=fk(function(){cy(r),t()}),r=dk(function(){uy(n),t()},uk);return[n,r]});function Gme(e){let t,n,r,i,o,a,s;const u=typeof document<"u"&&document.attachEvent;if(!u){a=function(x){const S=x.__resizeTriggers__,C=S.firstElementChild,p=S.lastElementChild,w=C.firstElementChild;p.scrollLeft=p.scrollWidth,p.scrollTop=p.scrollHeight,w.style.width=C.offsetWidth+1+"px",w.style.height=C.offsetHeight+1+"px",C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight},o=function(x){return x.offsetWidth!==x.__resizeLast__.width||x.offsetHeight!==x.__resizeLast__.height},s=function(x){if(x.target.className&&typeof x.target.className.indexOf=="function"&&x.target.className.indexOf("contract-trigger")<0&&x.target.className.indexOf("expand-trigger")<0)return;const S=this;a(this),this.__resizeRAF__&&sw(this.__resizeRAF__),this.__resizeRAF__=lw(function(){o(S)&&(S.__resizeLast__.width=S.offsetWidth,S.__resizeLast__.height=S.offsetHeight,S.__resizeListeners__.forEach(function(w){w.call(S,x)}))})};let m=!1,g="";r="animationstart";const y="Webkit Moz O ms".split(" ");let v="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),_="";{const x=document.createElement("fakeelement");if(x.style.animationName!==void 0&&(m=!0),m===!1){for(let S=0;S<y.length;S++)if(x.style[y[S]+"AnimationName"]!==void 0){_=y[S],g="-"+_.toLowerCase()+"-",r=v[S],m=!0;break}}}n="resizeanim",t="@"+g+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",i=g+"animation: 1ms "+n+"; "}const l=function(m){if(!m.getElementById("detectElementResize")){const g=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',y=m.head||m.getElementsByTagName("head")[0],v=m.createElement("style");v.id="detectElementResize",v.type="text/css",e!=null&&v.setAttribute("nonce",e),v.styleSheet?v.styleSheet.cssText=g:v.appendChild(m.createTextNode(g)),y.appendChild(v)}};return{addResizeListener:function(m,g){if(u)m.attachEvent("onresize",g);else{if(!m.__resizeTriggers__){const y=m.ownerDocument,v=pi.getComputedStyle(m);v&&v.position==="static"&&(m.style.position="relative"),l(y),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=y.createElement("div")).className="resize-triggers";const _=y.createElement("div");_.className="expand-trigger",_.appendChild(y.createElement("div"));const x=y.createElement("div");x.className="contract-trigger",m.__resizeTriggers__.appendChild(_),m.__resizeTriggers__.appendChild(x),m.appendChild(m.__resizeTriggers__),a(m),m.addEventListener("scroll",s,!0),r&&(m.__resizeTriggers__.__animationListener__=function(C){C.animationName===n&&a(m)},m.__resizeTriggers__.addEventListener(r,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(g)}},removeResizeListener:function(m,g){if(u)m.detachEvent("onresize",g);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(g),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",s,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(r,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}}}}class Kme extends h.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var o,a,s,u;const l=window.getComputedStyle(this._parentNode)||{},d=parseFloat((o=l.paddingLeft)!==null&&o!==void 0?o:"0"),f=parseFloat((a=l.paddingRight)!==null&&a!==void 0?a:"0"),m=parseFloat((s=l.paddingTop)!==null&&s!==void 0?s:"0"),g=parseFloat((u=l.paddingBottom)!==null&&u!==void 0?u:"0"),y=this._parentNode.getBoundingClientRect(),v=y.height-m-g,_=y.width-d-f,x=this._parentNode.offsetHeight-m-g,S=this._parentNode.offsetWidth-d-f;(!n&&(this.state.height!==x||this.state.scaledHeight!==v)||!r&&(this.state.width!==S||this.state.scaledWidth!==_))&&(this.setState({height:x,width:S,scaledHeight:v,scaledWidth:_}),typeof i=="function"&&i({height:x,scaledHeight:v,scaledWidth:_,width:S}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=Gme(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,nonce:a,onResize:s,style:u={},tagName:l="div",...d}=this.props,{height:f,scaledHeight:m,scaledWidth:g,width:y}=this.state,v={overflow:"visible"},_={};let x=!1;return i||(f===0&&(x=!0),v.height=0,_.height=f,_.scaledHeight=m),o||(y===0&&(x=!0),v.width=0,_.width=y,_.scaledWidth=g),h.createElement(l,{ref:this._setRef,style:{...v,...u},...d},!x&&t(_))}}class Yme{constructor(){this.subscriptions=new Map}register(t,n){const r=this.subscriptions.get(t)??new Set;return r.add(n),this.subscriptions.set(t,r),()=>{r.delete(n)}}async emit(t,...n){if(!this.subscriptions.has(t))return;const r=this.subscriptions.get(t),i=async o=>{o(...n)};r&&await Promise.allSettled([...r].map(o=>i(o)))}}var uc;(function(e){e.EnterEditModeWithCharacter="enterEditModeWithCharacter",e.ClearCell="clearCell",e.ClearRow="clearRow",e.InteractionsFired="interactionsFired"})(uc||(uc={}));var je;(function(e){e[e.Visual=0]="Visual",e[e.Edit=1]="Edit",e[e.MultiSelect=2]="MultiSelect"})(je||(je={}));function cu(e){}const Xme={mouseDown:!1,setMouseDown:cu,tableRef:{current:null},disabledKeyboardInteractions:new Set,setDisabledKeyboardInteractions:cu,selectedRow:void 0,selectedColumn:void 0,multiSelectCornerRow:void 0,multiSelectCornerColumn:void 0,setActiveCell:()=>{},indicatorHidden:!1,setIndicatorHidden:cu,setMultiSelectCorner:()=>{},activeCellRef:{current:null},multiSelectCornerCellRef:{current:null},isDragging:!1,setIsDragging:cu,listRef:{current:null},cursorMode:0,setCursorMode:cu,clearCell:()=>{},clearRow:e=>{},enterEditModeWithCharacter:e=>{},registerEventListener:()=>()=>{},emitInteractionsFired:()=>{}},TO=h.createContext(Xme);function Qme({children:e}){const[t,n]=h.useState(!1),r=h.useRef(null),i=h.useRef(null),[o]=h.useState(()=>new Yme),[a,s]=h.useState(new Set),[u,l]=h.useState(),[d,f]=h.useState(),[m,g]=h.useState(),[y,v]=h.useState(),[_,x]=h.useState(!1),[S,C]=h.useState(0),[p,w]=h.useState(!1),b=h.useRef(null),k=h.useRef(null),E=h.useCallback((L,T)=>{l(L),f(T)},[]),I=h.useCallback((L,T)=>{g(L),v(T)},[]),j=h.useCallback(()=>{o.emit("clearCell")},[o]),P=h.useCallback(L=>{o.emit("clearRow",L)},[o]),B=h.useCallback(L=>{o.emit("enterEditModeWithCharacter",L)},[o]),W=h.useCallback(L=>{o.emit("interactionsFired",L)},[o]),D=h.useMemo(()=>({mouseDown:t,setMouseDown:n,tableRef:r,disabledKeyboardInteractions:a,setDisabledKeyboardInteractions:s,selectedRow:u,selectedColumn:d,multiSelectCornerRow:m,multiSelectCornerColumn:y,indicatorHidden:p,setIndicatorHidden:w,setActiveCell:E,setMultiSelectCorner:I,activeCellRef:b,multiSelectCornerCellRef:k,isDragging:_,setIsDragging:x,listRef:i,cursorMode:S,setCursorMode:C,registerEventListener:o.register.bind(o),clearCell:j,clearRow:P,enterEditModeWithCharacter:B,emitInteractionsFired:W}),[a,u,d,y,m,p,E,I,_,S,W,t]);return c.jsx(TO.Provider,{value:D,children:e})}function lr(){return h.useContext(TO)}const Jme='abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=[]{};:"|,./<>?`~ø';var Ma;(function(e){e[e.ExitEditMode=0]="ExitEditMode",e[e.EditNextRow=1]="EditNextRow",e[e.EditNextCell=2]="EditNextCell",e[e.EditPreviousCell=3]="EditPreviousCell",e[e.ExpandRow=4]="ExpandRow",e[e.Copy=5]="Copy",e[e.DeleteCell=6]="DeleteCell",e[e.DeleteRow=7]="DeleteRow",e[e.MoveCursorUp=8]="MoveCursorUp",e[e.MoveCursorDown=9]="MoveCursorDown",e[e.MoveCursorLeft=10]="MoveCursorLeft",e[e.MoveCursorRight=11]="MoveCursorRight",e[e.EnterEditModeWithEnter=12]="EnterEditModeWithEnter",e[e.EnterEditModeByTyping=13]="EnterEditModeByTyping",e[e.MoveMultiSelectCornerUp=14]="MoveMultiSelectCornerUp",e[e.MoveMultiSelectCornerDown=15]="MoveMultiSelectCornerDown",e[e.MoveMultiSelectCornerLeft=16]="MoveMultiSelectCornerLeft",e[e.MoveMultiSelectCornerRight=17]="MoveMultiSelectCornerRight",e[e.Undo=18]="Undo"})(Ma||(Ma={}));const T0=({cursorMode:e,multiSelectCornerRow:t,multiSelectCornerColumn:n,selectedRow:r,selectedColumn:i})=>{const o=(e===je.MultiSelect?t:r)??0,a=(e===je.MultiSelect?n:i)??0;return{row:o,col:a}},Zme=({multiSelectCornerColumn:e,multiSelectCornerRow:t,selectedColumn:n,selectedRow:r})=>{const i=(t??r??0)-(r??0),o=(e??n??0)-(n??0);return[i,o]},O0=(e,t)=>({translateCursor:n,tableContext:r})=>{let i=e,o=t;if(r.cursorMode===je.MultiSelect){const[a,s]=Zme(r);i+=a,o+=s,r.setMultiSelectCorner(void 0,void 0)}r.setCursorMode(je.Visual),n(i,o)},ege={id:0,keys:new Set(["Escape"]),cursorMode:new Set([je.Edit]),handler:({tableContext:e,tableRef:t})=>{var n;e.setCursorMode(je.Visual),(n=t.current)==null||n.focus()}},tge={id:1,keys:new Set(["Enter"]),shift:!1,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(1,0)}},nge={id:2,keys:new Set(["Tab"]),shift:!1,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(0,1)}},rge={id:3,keys:new Set(["Tab"]),shift:!0,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(0,-1)}},ige={id:5,keys:new Set(["c"]),mod:!0,cursorMode:new Set([je.Visual,je.MultiSelect]),condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({event:e,copy:t})=>{e.preventDefault(),t==null||t()}},oge={id:18,keys:new Set(["z"]),mod:!0,cursorMode:new Set([je.Visual,je.MultiSelect]),condition:()=>{var e;return((e=document.activeElement)==null?void 0:e.tagName)!=="INPUT"},handler:({undo:e})=>{e==null||e()}},age={id:6,keys:new Set(["Delete","Backspace"]),cursorMode:new Set([je.Visual,je.MultiSelect]),condition:({tableContext:e})=>e.selectedColumn!==0&&e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.clearCell()}},sge={id:7,keys:new Set(["Delete","Backspace"]),cursorMode:new Set([je.Visual]),condition:({tableContext:e})=>e.selectedColumn===0&&e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.clearRow(e.selectedRow)}},lge={id:8,keys:new Set(["ArrowUp"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:O0(-1,0)},cge={id:9,keys:new Set(["ArrowDown"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:O0(1,0)},uge={id:10,keys:new Set(["ArrowLeft"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:O0(0,-1)},dge={id:11,keys:new Set(["ArrowRight"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:O0(0,1)},fge={id:12,keys:new Set(["Enter"]),cursorMode:new Set([je.Visual]),condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedColumn!==0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.setCursorMode(je.Edit)}},pge={id:4,cursorMode:new Set([je.Visual]),keys:new Set(["Enter"]),condition:({tableContext:e})=>e.selectedColumn===0,handler:({expand:e,tableContext:t})=>{e==null||e(t.selectedRow)}},hge={id:13,keys:new Set(Jme.split("")),cursorMode:new Set([je.Visual]),mod:!1,condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedColumn!==0&&e.selectedRow!==void 0,preventDefault:!0,handler:({tableContext:e,event:t})=>{e.enterEditModeWithCharacter(t.key),e.setCursorMode(je.Edit)}},mge={id:14,keys:new Set(["ArrowUp"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e})=>{const{row:t,col:n}=T0(e);e.setMultiSelectCorner(Math.max(0,t-1),n),e.setCursorMode(je.MultiSelect)}},gge={id:15,keys:new Set(["ArrowDown"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e})=>{const{row:t,col:n}=T0(e);e.setMultiSelectCorner(Math.max(0,t+1),n),e.setCursorMode(je.MultiSelect)}},vge={id:16,keys:new Set(["ArrowLeft"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e,columnCount:t})=>{const{row:n,col:r}=T0(e);e.setMultiSelectCorner(n,Math.min(Math.max(r-1,0),t)),e.setCursorMode(je.MultiSelect)}},yge={id:17,keys:new Set(["ArrowRight"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e,columnCount:t})=>{const{row:n,col:r}=T0(e);e.setMultiSelectCorner(n,Math.min(Math.max(r+1,0),t)),e.setCursorMode(je.MultiSelect)}},bge=[ege,tge,nge,rge,pge,ige,oge,age,sge,lge,cge,uge,dge,fge,hge,mge,gge,vge,yge];var Gl;(function(e){e.Start="flex-start",e.End="flex-end",e.Center="center"})(Gl||(Gl={}));function w4({rowIndex:e,columnIndex:t,className:n,children:r,disabled:i,align:o,role:a,onEnterEditModeWithCharacter:s=()=>{},onEditNextRow:u}){const l=h.useRef(null),[d,f]=h.useState(!1),{mouseDown:m,selectedRow:g,selectedColumn:y,multiSelectCornerRow:v,multiSelectCornerColumn:_,cursorMode:x,setActiveCell:S,setMultiSelectCorner:C,activeCellRef:p,multiSelectCornerCellRef:w,setCursorMode:b,registerEventListener:k,disabledKeyboardInteractions:E,setMouseDown:I}=lr(),j=e===g&&t===y,P=e===v&&t===_,B=h.useCallback(()=>{I(!1)},[]),W=h.useCallback(()=>{m&&(C(e,t),b(je.MultiSelect))},[m,e,t]),D=h.useCallback(V=>V.target.tagName==="INPUT"||V.target.tagName==="BUTTON"?!1:j&&t!==0,[j,t]),L=h.useCallback(V=>{if(I(!0),V.shiftKey){V.stopPropagation(),b(je.MultiSelect),C(e,t);return}if(t===1/0||e===1/0){S(void 0,void 0);return}if(D(V)){f(!0);return}E.has(Ma.ExitEditMode)||j&&x===je.Edit||(b(je.Visual),S(e,t))},[S,t,D,x,j]),T=h.useCallback(()=>{d&&(C(void 0,void 0),I(!1),b(je.Edit),f(!1))},[d]);return h.useLayoutEffect(()=>{l.current&&P&&(w.current=l.current)},[P]),h.useEffect(()=>{if(l.current&&j){l.current.contains(document.activeElement)||l.current.focus({preventScroll:!0}),p.current=l.current;const V=[k(uc.EnterEditModeWithCharacter,s),k(uc.InteractionsFired,H=>{H.includes(Ma.EditNextRow)&&j&&(u==null||u())})];return()=>{for(const H of V)H()}}},[j,s,u]),c.jsx(Sge,{"aria-colindex":t+1,ref:l,disabled:i,role:a??"gridcell",className:n,allowUserSelect:x===je.Edit,align:o,tabIndex:j?0:-1,onMouseDown:L,onMouseUp:B,onClick:T,onMouseEnter:W,children:r})}function wge({children:e,onExpand:t,...n}){return c.jsxs(xge,{role:"rowheader",...n,children:[c.jsx(Wt,{title:"Open resource",onClick:()=>t(n.rowIndex),children:c.jsx(qU,{})}),c.jsx(cw,{children:e})]})}const cw=A.span.withConfig({displayName:"Cell__IndexNumber",componentId:"sc-22275dfa-0"})([""]),xge=A(w4).withConfig({displayName:"Cell__StyledIndexCell",componentId:"sc-22275dfa-1"})(["justify-content:flex-end !important;color:",";& button{display:none;}&:hover ",",&:focus-within ","{display:none;}&:hover button,&:focus-within button{display:block;}"],e=>e.theme.colors.textLight,cw,cw),Sge=A.div.withConfig({displayName:"Cell__CellWrapper",componentId:"sc-22275dfa-2"})(["background-color:",";cursor:",";display:flex;width:100%;justify-content:",";align-items:center;user-select:",";padding-inline:var(--table-inner-padding);white-space:nowrap;text-overflow:ellipsis;position:relative;outline:none;"],e=>e.disabled?e.theme.colors.bg1:e.theme.colors.bg,e=>e.disabled?"not-allowed":"pointer",e=>e.align??"flex-start",e=>e.allowUserSelect?"text":"none"),x4=h.forwardRef(({children:e,...t},n)=>c.jsx(Cge,{role:"row",...t,ref:n,children:e}));x4.displayName="TableRow";const Cge=A.div.withConfig({displayName:"TableRow__StyledDiv",componentId:"sc-a9308d57-0"})(["display:grid;grid-template-columns:var(--table-template-columns);height:var(--table-row-height);& > div{border-bottom:1px solid ",";border-right:1px solid ",";&:last-child{border-right:none;}}&:last-child > div{border-bottom:none;}"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg2);function OO({index:e}){const{setNodeRef:t,isOver:n}=cO({id:`droppable-${e}`,data:{index:e}});return c.jsx(_ge,{ref:t,hover:n})}const _ge=A.div.withConfig({displayName:"ReorderDropArea__ReorderDropZone",componentId:"sc-5be5df54-0"})(["--dropzone-width:0.4rem;position:absolute;background-color:",";opacity:0.4;width:var(--dropzone-width);height:min( var(--table-height),var(--table-content-height) + var(--table-row-height) );top:0;left:calc(var(--dropzone-width) * 0.5 * -1);z-index:10;box-shadow:0 0 7px 0 ",";transform:scaleX(",");",""],e=>e.theme.colors.main,e=>Ra(.3,e.theme.colors.main),e=>e.hover?1:0,Wn("transform","opacity")),pk="6ch",kge=e=>{try{return Number.parseFloat(e.replace("px",""))}catch(t){return console.error("parseSize error",t),S4}},hk=e=>e.map(t=>`${t}px`),S4=300,mk=S4+"px";function jge(e,t,n){const[r,i]=h.useState(e?hk(e):Array(t.length).fill(mk)),o=h.useCallback((u,l)=>{i(d=>{d.length!==t.length&&console.error("prevSizes.length !== columns.length",t,d);const f=[...d];return f[u]=l,f}),n(r.map(kge))},[t,r,n]);h.useEffect(()=>{e&&i(hk(e))},[e]),h.useEffect(()=>{if(t.length===0)return;const u=t.length-r.length;u>0&&i([...r,...Array(u).fill(mk)]),u<0&&i(r.slice(0,t.length))},[t]);const a=`${pk} ${r.join(" ")} minmax(50px, 1fr)`,s=`calc(${pk} + ${r.join(" + ")})`;return{templateColumns:a,contentRowWidth:s,resizeCell:o}}function Ege({dragKey:e,index:t,isReordering:n,column:r,onResize:i,HeadingComponent:o}){const{attributes:a,listeners:s,setNodeRef:u,isDragging:l}=sO({id:e,data:{index:t}}),{targetRef:d,dragAreaRef:f,isDragging:m}=wP({initialSize:S4,minSize:100,onResize:v=>i(t,`${v}px`)}),{setIsDragging:g}=lr();h.useEffect(()=>{g(m)},[m]);const y=h.useCallback(v=>{u(v),d.current=v},[]);return c.jsxs(Em,{ref:y,reordering:l,role:"columnheader","aria-colindex":t+2,children:[c.jsx(o,{column:r,dragListeners:s,dragAttributes:a}),n&&c.jsx(OO,{index:t}),c.jsx(Age,{isDragging:m,ref:f})]})}function Rge({children:e}){return c.jsx(Pge,{children:e})}const Em=A.div.withConfig({displayName:"TableHeading__TableHeadingWrapper",componentId:"sc-398d6d04-0"})(["position:relative;background-color:",";display:flex;width:100%;align-items:center;justify-content:",";padding-inline:var(--table-inner-padding);font-weight:bold;white-space:nowrap;isolation:isolate;color:",";"],e=>e.reordering?Ra(.5,e.theme.colors.bg):e.theme.colors.bgBody,e=>e.align??"start",e=>e.reordering?Ra(.5,e.theme.colors.textLight):e.theme.colors.textLight),Pge=A(Em).withConfig({displayName:"TableHeading__TableHeadingWrapperDummy",componentId:"sc-398d6d04-1"})(["cursor:grabbing;"]),Age=A(xP).withConfig({displayName:"TableHeading__ResizeHandle",componentId:"sc-398d6d04-2"})(["--handle-margin:4px;right:-2px;top:0;height:calc(var(--table-row-height) - (var(--handle-margin) * 2));width:4px;margin-top:var(--handle-margin);z-index:10;position:absolute;"]);function Ige({columns:e,onResize:t,columnToKey:n,onColumnReorder:r,HeadingComponent:i,NewColumnButtonComponent:o,headerRef:a}){const[s,u]=h.useState(),l=h.useCallback(f=>{const m=e.map(n).indexOf(f.active.id);u(m),document.body.style.cursor="grabbing"},[e,n]),d=h.useCallback(({active:f,over:m})=>{if(u(void 0),document.body.style.cursor="unset",m){const g=f.data.current.index;let y=m.data.current.index;if(g===y||g+1===y)return;y>g&&(y-=1),r==null||r(g,y)}},[r]);return $T({onDragStart:l,onDragEnd:d}),c.jsxs("div",{role:"rowgroup",children:[c.jsxs(Tge,{ref:a,"aria-rowindex":1,children:[c.jsx(Em,{align:"end","aria-colindex":1,role:"columnheader",children:"#"}),e.map((f,m)=>c.jsx(Ege,{dragKey:n(f),index:m,onResize:t,isReordering:s!==void 0,column:f,HeadingComponent:i},n(f))),c.jsxs(Em,{"aria-colindex":e.length+2,children:[c.jsx(OO,{index:e.length}),c.jsx(o,{})]})]}),Ln.createPortal(c.jsx(Oge,{children:s!==void 0&&c.jsx(Rge,{children:c.jsx(i,{column:e[s]})})}),document.body)]})}const Tge=A(x4).withConfig({displayName:"TableHeader__StyledTableRow",componentId:"sc-8907b61b-0"})(["z-index:10;position:relative;"]),Oge=A(ape).withConfig({displayName:"TableHeader__StyledDragOverlay",componentId:"sc-8907b61b-1"})(["box-shadow:",";background-color:",";display:flex;align-items:center;border-radius:",";padding-inline:","rem;opacity:0.88;"],e=>e.theme.boxShadowSoft,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin),Dge=(e,t)=>e.shift===void 0||e.shift===t.shiftKey,Nge=(e,t)=>e.mod===void 0||e.mod===(navigator.platform.includes("Mac")?t.metaKey:t.ctrlKey),Mge=(e,t)=>e.condition===void 0||e.condition(t),$ge=e=>{var t;return(t=e.current)==null?void 0:t.contains(document.activeElement)};function Lge(e,t,n,r,i){const o=lr(),{disabledKeyboardInteractions:a,selectedRow:s,selectedColumn:u,multiSelectCornerRow:l,multiSelectCornerColumn:d,setActiveCell:f,listRef:m,emitInteractionsFired:g}=o,y=mV();return h.useCallback(_=>{if(y||$ge(r))return;const S={tableContext:o,event:_,tableRef:n,columnCount:e,...i,translateCursor:(p,w)=>{let b=(s??0)+p,k=(u??0)+w;k<0&&(b-=1,k=e),k>e&&(b+=1,k=1),m.current&&m.current.scrollToItem(b,"auto"),f(Math.min(Math.max(b,0),t-1),k)}},C=bge.filter(p=>!a.has(p.id)&&p.keys.has(_.key)&&p.cursorMode.has(o.cursorMode)&&Dge(p,_)&&Nge(p,_)&&Mge(p,S));for(const p of C)p.preventDefault&&_.preventDefault(),p.handler(S);g(C.map(p=>p.id))},[a,s,u,l,d,o,i.copy,i.undo,i.expand,y,g])}function Fge(e,t,n,r){return r?Math.min(n.left-e,r.left-e)+t-1:n.left-e+t-1}function zge(e,t,n){return n?Math.min(t.top,n.top)-e-1:t.top-e-1}function Bge(e,t){if(!t)return e.width+1;const n=Math.min(e.left,t.left);return Math.max(e.left+e.width,t.left+t.width)-n+1}function Hge(e,t){if(!t)return e.height+1;const n=Math.min(e.top,t.top);return Math.max(e.top+e.height,t.top+t.height)-n+1}function Uge(e,t,n,r,i){const o=e-1;return i&&t.height===0?n.top+n.height-r-o:!i&&n.height===0?t.top+t.height-r-o:i&&n.height===0?t.top-o:!i&&t.height===0?n.top-o:0}const Wge=(e,t,n)=>{const r=n+e.left-t.left;return e.left<=t.left?r:r+e.width-t.width};function Vge(e,t,n){requestAnimationFrame(()=>{const r=Wge(n,t,e.scrollLeft);e.scroll(r,0)})}const qge=(e,t)=>t.left<e.left||t.right>e.right,Gge=(e,t)=>{if(e===je.MultiSelect&&t.current)return t.current.getBoundingClientRect()};function Kge({sizeStr:e,scrollerRef:t,setOnScroll:n}){const[r,i]=h.useState(!1),[o,a]=h.useState(!1),[s,u]=h.useState(!1),[{top:l,left:d,width:f,height:m},g]=h.useState({top:0,left:0,width:0,height:0}),{selectedColumn:y,selectedRow:v,multiSelectCornerColumn:_,multiSelectCornerRow:x,activeCellRef:S,isDragging:C,cursorMode:p,indicatorHidden:w,multiSelectCornerCellRef:b}=lr(),k=h.useCallback((E=!0)=>{if(!S.current||!t.current){i(!1);return}const I=S.current.getBoundingClientRect(),j=t.current.getBoundingClientRect(),P=Gge(p,b);if(E&&qge(j,I)?(u(!0),Vge(t.current,j,I)):u(!1),p===je.MultiSelect&&(I.height===0||(P==null?void 0:P.height)===0)){g(B=>({top:Uge(j.top,I,P,B.height,(v??0)<(x??0)),left:B.left,width:B.width,height:B.height}));return}g({top:zge(j.top,I,P),left:Fge(j.left,t.current.scrollLeft,I,P),width:y===0?-1:Bge(I,P),height:Hge(I,P)})},[y,v,e,p,_,x]);return h.useEffect(()=>{n(()=>(E,I,j)=>{j||(a(!0),k(!1))})},[k]),h.useEffect(()=>{if(y===void 0||v===void 0){i(!1);return}i(!0),a(!1),k()},[y,v,_,x]),h.useEffect(()=>{p===je.MultiSelect&&k(!1)},[p,b]),h.useEffect(()=>{a(!1),k(!1)},[e]),r?c.jsx(Yge,{top:l,left:d,width:f,height:m,noTransition:C||o||s,cursorMode:p,hidden:w}):c.jsx("span",{})}const Yge=A.div.attrs(e=>({style:{transform:`translate(${e.left}px, ${e.top}px)`,width:e.width>0?`${e.width}px`:"calc(var(--table-content-width) + 1px)",height:`${e.height}px`}})).withConfig({displayName:"ActiveCellIndicator__Indicator",componentId:"sc-8c23d57d-0"})(["--speed:","ms;visibility:",";position:absolute;top:0;left:0;border:2px solid ",";pointer-events:none;will-change:transform,width;transition:transform var(--speed) ease-out,width var(--speed) ease-out,height var(--speed) ease-out;z-index:1;background-color:",";"],e=>e.noTransition?0:70,e=>e.hidden?"hidden":"visible",e=>e.theme.colors.main,e=>e.cursorMode===je.Edit?"none":Ra(.85,e.theme.colors.main));function gk(e,t){return e.map(n=>n.map(r=>r[t]))}const Xge=e=>`<tr>${e}</tr>`,Qge=e=>`<td>${e??""}</td>`;function Jge(e){return`<table><tbody>${e.map(n=>Xge(n.map(Qge).join(""))).join("")}</tbody></table>`}function Zge(e){return e.map(t=>t.join(" ")).join(`
`)}function e0e(e){const t=gk(e,"html"),n=gk(e,"plain"),r=Jge(t),i=Zge(n),o="text/html",a=new Blob([r],{type:o}),s="text/plain",u=new Blob([i],{type:s}),l=new ClipboardItem({[o]:a,[s]:u});return navigator.clipboard.write([l])}function t0e(e){const t=document.createElement("template");t.innerHTML=e;const n=t.content.querySelector("table tbody");if(!n)return[[t.content.textContent??""]];const r=[];return n.querySelectorAll("tr").forEach(i=>{const o=[];i.querySelectorAll("td").forEach(a=>{const s=[];if(a.querySelectorAll("a").forEach(u=>{s.push(u.href)}),s.length>0){o.push(s.join(","));return}o.push(a.textContent??"")}),r.push(o)}),t.remove(),r}const n0e=(e,t,n)=>{if(t===0)return[[e,0],[e,n.length-1]];const r=[e,t-1];return[[...r],[...r]]},r0e=(e,t,n,r,i)=>{if(t===0||r===0)return[[Math.min(e,n),0],[Math.max(e,n),i.length-1]];const o=[e,t-1],a=[n,r-1];return[o,a]};function i0e([e,t],[n,r],i){const o=[];for(let a=Math.min(t,r);a<=Math.max(t,r);a++)for(let s=Math.min(e,n);s<=Math.max(e,n);s++)o.push([s,i[a]]);return o}function DO(e){const{selectedRow:t,selectedColumn:n,multiSelectCornerRow:r,multiSelectCornerColumn:i,cursorMode:o}=lr();return h.useCallback(()=>{if(n===void 0||t===void 0)return[];const[a,s]=o===je.MultiSelect?r0e(t,n,r,i,e):n0e(t,n,e);return i0e(a,s,e)},[t,n,r,i,o,e])}function o0e(e,t){const{selectedRow:n,selectedColumn:r}=lr(),i=DO(e);return h.useCallback(async()=>{if(r===void 0||n===void 0)return;const a=i(),s=await(t==null?void 0:t(a));s!==void 0&&e0e(s)},[n,r,t,i])}function a0e(e,t,n){const{registerEventListener:r}=lr(),i=DO(e);h.useEffect(()=>{if(t)return r(uc.ClearRow,t)},[t,r]),h.useEffect(()=>{if(!n)return;const o=()=>{const a=i();n==null||n(a)};return r(uc.ClearCell,o)},[r,n,i])}const s0e=(e,t,n,r)=>{const i=[];for(const[o,a]of e.entries())for(const[s,u]of a.entries())i.push({index:[o+n,t[s+Math.max(0,r-1)]],data:u});return i};function l0e(e,t){const{selectedRow:n,selectedColumn:r}=lr();return h.useCallback(async o=>{var s,u;if(r===void 0||n===void 0||((s=document.activeElement)==null?void 0:s.tagName)==="INPUT")return;const a=(u=o.clipboardData)==null?void 0:u.getData("text/html");if(a){const l=t0e(a),d=s0e(l,e,n,r);t==null||t(d)}},[n,r,t])}function c0e(){const e=Lu(ZT,{activationConstraint:{distance:10}}),t=Lu(eO,{activationConstraint:{delay:250,tolerance:5}}),n=Lu(R0);return LT(e,t,n)}const u0e=({transform:e})=>({...e,y:0});function d0e({children:e}){const t=c0e();return c.jsx(aO,{sensors:t,collisionDetection:HT,modifiers:[u0e],children:e})}const NO=A.div.withConfig({displayName:"VisuallyHidden",componentId:"sc-3f3f890d-0"})(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]),f0e="Use the arrow keys to navigate the table. Press enter to edit a cell. Press escape to exit edit mode.";function MO(e){return c.jsx(Qme,{children:c.jsx(p0e,{...e})})}MO.defaultProps={rowHeight:40};function p0e({children:e,columns:t,itemCount:n,rowHeight:r,columnSizes:i,columnToKey:o,labelledBy:a,onCellResize:s=()=>{},onClearCells:u,onClearRow:l,onCopyCommand:d,onUndoCommand:f,onPasteCommand:m,onColumnReorder:g,onRowExpand:y=()=>{},HeadingComponent:v,NewColumnButtonComponent:_}){const x=h.useId(),S=h.useRef(null),C=h.useRef(null),{listRef:p,tableRef:w,setCursorMode:b,disabledKeyboardInteractions:k}=lr(),[E,I]=h.useState(()=>{}),{templateColumns:j,contentRowWidth:P,resizeCell:B}=jge(i,t,s),W=h.useCallback(()=>{k.has(Ma.ExitEditMode)||b(je.Visual)},[k]);Wx([w],W,!0);const D=o0e(t,d),L=l0e(t,m),T=h.useMemo(()=>({copy:D,undo:f,expand:y}),[D,f,y]),V=Lge(t.length,n,w,C,T);a0e(t,l,u);const H=h.useCallback(({index:N,style:J})=>c.jsxs(x4,{style:J,"aria-rowindex":N+2,children:[c.jsx(wge,{rowIndex:N,columnIndex:0,onExpand:y,children:N+1}),e({index:N}),c.jsx(w4,{rowIndex:1/0,columnIndex:1/0,disabled:!0})]}),[n,e]),q=h.useCallback(({height:N})=>c.jsx(g0e,{height:N,width:"100%",itemSize:r,itemCount:n,overscanCount:4,onScroll:E,ref:p,children:H}),[r,n,p,H,E]);return h.useEffect(()=>(document.addEventListener("paste",L),()=>{document.removeEventListener("paste",L)}),[L]),c.jsxs(d0e,{children:[c.jsx(NO,{id:x,children:c.jsx("p",{children:f0e})}),c.jsx(h0e,{"aria-labelledby":a,"aria-rowcount":n,"aria-colcount":t.length+2,"aria-describedby":x,role:"grid",gridTemplateColumns:j,contentRowWidth:P,rowHeight:r,tabIndex:0,onKeyDown:V,totalContentHeight:n*r,ref:w,children:c.jsx(y0e,{ref:S,type:"hover",children:c.jsxs(m0e,{children:[c.jsx(Ige,{headerRef:C,columns:t,columnToKey:o,onResize:B,onColumnReorder:g,HeadingComponent:v,NewColumnButtonComponent:_}),c.jsx(v0e,{role:"rowgroup",children:c.jsx(Kme,{disableWidth:!0,children:q})}),c.jsx(Kge,{sizeStr:j,scrollerRef:S,setOnScroll:I})]})})})]})}const h0e=A.div.attrs(e=>({style:{"--table-template-columns":e.gridTemplateColumns,"--table-content-width":e.contentRowWidth}})).withConfig({displayName:"TableEditor__Table",componentId:"sc-221cbe59-0"})(["--table-height:80vh;--table-row-height:","px;--table-inner-padding:0.5rem;--table-content-height:","px;background:",";border-radius:",";overflow:hidden;overflow-x:auto;border:1px solid ",";width:100%;position:relative;contain:paint;overscroll-behavior:contain;&:focus-visible{outline:none;box-shadow:0 0 0 2px ",";}"],e=>e.rowHeight,e=>e.totalContentHeight,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.colors.main),m0e=A.div.withConfig({displayName:"TableEditor__PercentageInsanityFix",componentId:"sc-221cbe59-1"})(["width:fit-content;min-width:100%;"]),g0e=A(qme).withConfig({displayName:"TableEditor__StyledFixedSizeList",componentId:"sc-221cbe59-2"})(["overflow-x:hidden !important;overflow-y:auto !important;"]),v0e=A.div.withConfig({displayName:"TableEditor__AutoSizeTamer",componentId:"sc-221cbe59-3"})(["height:min(var(--table-height),var(--table-content-height));width:100%;"]),y0e=A(Hs).withConfig({displayName:"TableEditor__RelativeScrollArea",componentId:"sc-221cbe59-4"})(["& ","{position:relative;}"],bP);function b0e(e,t,n){const r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function $O(e){const{setIndicatorHidden:t,setDisabledKeyboardInteractions:n}=lr();h.useEffect(()=>(e.hideActiveIndicator&&t(!0),()=>{e.hideActiveIndicator&&t(!1)}),[e.hideActiveIndicator]),h.useEffect(()=>(e.disabledKeyboardInteractions&&n(e.disabledKeyboardInteractions),()=>{n(new Set)}),[e.disabledKeyboardInteractions])}function w0e(e){return fe({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"}}]})(e)}function C4({resource:e,children:t,...n}){const r=Ua(),i=h.useMemo(()=>{try{return mt(e.getSubject())}catch{return"#"}},[e]),o=a=>{a.preventDefault(),r(i)};try{return c.jsx(x0e,{href:i,onClick:o,...n,children:t})}catch{return c.jsx(c.Fragment,{children:e.getSubject()})}}const x0e=A.a.withConfig({displayName:"SimpleResourceLink__StyledAnchor",componentId:"sc-235b4be0-0"})(["text-decoration:none;&:hover,&:focus-visible{text-decoration:underline;}"]);function S0e({resource:e}){const[t]=nt(e);return c.jsxs(C0e,{resource:e,children:[c.jsx("span",{children:"@"})," ",t]})}const C0e=A(C4).withConfig({displayName:"AgentCell__StyledLink",componentId:"sc-d8757c67-0"})(["background-color:",";padding-inline:8px;padding-block:1px;border-radius:40px;color:",";text-decoration:none;span{color:",";}:hover{box-shadow:0px 0px 0px 1px ",";}"],e=>_0e(e.theme.colors.main,e.theme.darkMode),e=>vk(e.theme.colors.main,e.theme.darkMode),e=>e.theme.colors.textLight,e=>vk(e.theme.colors.main,e.theme.darkMode)),LO=e=>Ou(.92,E9(e)),FO=e=>Ou(.25,E9(e)),vk=(e,t)=>t?LO(e):FO(e),_0e=(e,t)=>t?FO(e):LO(e);function k0e({resource:e}){const[t]=nt(e),[n]=re(e,K.file.mimetype),[r]=re(e,K.file.downloadUrl),i=nP.has(n??""),o=rP(n??"");return c.jsxs(E0e,{children:[i?c.jsx(yk,{resource:e,tabIndex:-1,"aria-hidden":!0,children:c.jsx(j0e,{src:r,alt:t,loading:"lazy"})}):c.jsx(o,{}),c.jsx(yk,{resource:e,children:t})]})}const j0e=A.img.withConfig({displayName:"FileCell__Img",componentId:"sc-177c7d20-0"})(["width:calc(var(--table-row-height) - 6px);aspect-ratio:1/1;object-fit:cover;border-radius:5px;"]),E0e=A.div.withConfig({displayName:"FileCell__Wrapper",componentId:"sc-177c7d20-1"})(["display:flex;align-items:center;gap:0.5rem;color:",";"],e=>e.theme.colors.main),yk=A(C4).withConfig({displayName:"FileCell__StyledLink",componentId:"sc-177c7d20-2"})(["display:flex;height:fit-content;"]);function R0e(e,t,n){const[r,i]=h.useState(0),{drive:o}=Xe(),a=h.useMemo(()=>({parents:o,filters:t?{[F.properties.isA]:t}:void 0}),[o,t]),{results:s}=qd(e,a),u=h.useCallback(l=>{if(l.stopPropagation(),l.key==="ArrowUp"){l.preventDefault(),i(d=>Math.max(0,d-1));return}if(l.key==="ArrowDown"){l.preventDefault(),i(d=>Math.min(s.length-1,d+1));return}if(l.key==="Enter"){l.preventDefault(),l.stopPropagation(),n(s[r]);return}i(0)},[s,n,r]);return{results:s,selectedIndex:r,handleKeyDown:u}}const P0e=e=>{const t=ae(e),n=ae(t.props.classtype),r=(n==null?void 0:n.getSubject())!==Nt;return{classType:n,hasClassType:r}};function A0e({value:e,onChange:t,property:n,resource:r}){const i=ae(e),{classType:o,hasClassType:a}=P0e(n),[s]=nt(i),[u,l]=h.useState(!0),{setCursorMode:d}=lr(),f=h.useRef(null),[m,g]=h.useState(""),y=h.useMemo(()=>u?{disabledKeyboardInteractions:new Set([Ma.ExitEditMode])}:{},[u]);$O(y);const v=h.useCallback(P=>{P.preventDefault(),P.stopPropagation(),g(P.target.value)},[]),_=h.useCallback(P=>{t(P),l(!1)},[t]),x=h.useCallback(P=>{l(P),P||d(je.Visual)},[d]),{results:S,selectedIndex:C,handleKeyDown:p}=R0e(m,a?o.getSubject():void 0,_),w=h.useCallback(P=>{if(P.key==="Escape"){P.preventDefault(),l(!1);return}P.key!=="Tab"&&p(P)},[p]),b=h.useCallback(P=>{const B=P[0];B&&(t(B),l(!1))},[t,l]),k=h.useMemo(()=>c.jsxs(B0e,{children:[c.jsx(Ha,{})," ",i.getSubject()===Nt?`select ${a?o.title:"resource"}`:s]}),[s,i,o,a]);h.useEffect(()=>{f.current&&f.current.scrollIntoView(!1)},[C]);const E=a?`Search ${o.title}`:"Search...",I=S.length===0&&o.getSubject()===F.classes.file,j=S.length===0&&o.getSubject()!==F.classes.file;return c.jsxs(L0e,{Trigger:k,open:u,onOpenChange:x,noLock:!0,children:[c.jsx(ht,{children:c.jsx(wt,{type:"search",value:m,placeholder:E,onChange:v,onKeyDown:w})}),c.jsxs(F0e,{children:[S.length>0&&c.jsx("ol",{children:S.map((P,B)=>c.jsx("li",{"data-selected":B===C,ref:B===C?f:null,children:c.jsx(D0e,{subject:P,onClick:_})},P))}),j&&"No results",I&&c.jsx(N0e,{cellResource:i,onChange:t,row:r,onFilesUploaded:b})]})]})}function I0e({value:e}){const t=ae(e),[[n]]=Se(t,F.properties.isA);if(!e)return c.jsx(c.Fragment,{});const r=O0e(n);return c.jsx(r,{resource:t})}function T0e({resource:e}){const[t]=nt(e);return c.jsx(C4,{resource:e,children:t})}const O0e=e=>{switch(e){case F.classes.agent:return S0e;case F.classes.file:return k0e;default:return T0e}};function D0e({subject:e,onClick:t}){const n=ae(e),[r]=nt(n),[[i]]=Se(n,F.properties.isA),o=Fo(i),a=h.useCallback(()=>{t(e)},[e]);return c.jsxs($0e,{onClick:a,tabIndex:-1,children:[c.jsx(o,{}),r]})}function N0e({cellResource:e,onFilesUploaded:t,row:n,onChange:r}){const[i]=re(e,F.properties.file.mimetype),[o]=re(e,F.properties.file.downloadUrl),[a]=re(e,F.properties.file.filename),[s]=re(e,F.properties.description),u=i==null?void 0:i.startsWith("image/");return i?c.jsxs(H0e,{children:[u&&c.jsx(W0e,{src:o??"",alt:s??""}),u?null:c.jsx(Ve,{subject:e.getSubject(),children:a}),c.jsx(U0e,{title:"Clear",onClick:()=>r(void 0),children:c.jsx(lo,{})})]}):c.jsx(z0e,{parentResource:n,onFilesUploaded:t})}const M0e={Edit:A0e,Display:I0e},$0e=A.button.withConfig({displayName:"AtomicURLCell__ResultButton",componentId:"sc-3973e396-0"})(["display:flex;width:100%;align-items:center;gap:0.5rem;background:none;border:none;color:currentColor;cursor:pointer;padding:0.3rem;border-radius:",";&:hover{background:",";color:white;svg{color:white;}}svg{color:",";}"],e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.textLight),L0e=A(a3).withConfig({displayName:"AtomicURLCell__SearchPopover",componentId:"sc-3973e396-1"})(["padding:1rem;border:1px solid ",";display:flex;flex-direction:column;gap:1rem;"],e=>e.theme.colors.bg2),F0e=A.div.withConfig({displayName:"AtomicURLCell__ResultWrapper",componentId:"sc-3973e396-2"})(["height:min(90vh,20rem);width:min(90vw,35rem);overflow-x:hidden;overflow-y:auto;ol{padding:0;margin:0;}li{list-style:none;&[data-selected='true'] button{background:",";color:white;svg{color:white;}}}"],e=>e.theme.colors.main),z0e=A(S0).withConfig({displayName:"AtomicURLCell__StyledFileDropzoneInput",componentId:"sc-3973e396-3"})(["height:100%;"]),B0e=A(wg).withConfig({displayName:"AtomicURLCell__PopoverTrigger",componentId:"sc-3973e396-4"})(["border:none;background:none;color:",";display:inline-flex;gap:1ch;align-items:center;user-select:none;cursor:pointer;"],e=>e.theme.colors.main),H0e=A.div.withConfig({displayName:"AtomicURLCell__ViewerWrapper",componentId:"sc-3973e396-5"})(["display:flex;justify-content:center;align-items:center;height:100%;position:relative;padding:","rem;border-radius:",";border:1px solid ",";"],e=>e.theme.margin,e=>e.theme.radius,e=>e.theme.colors.bg2),U0e=A(Wt).withConfig({displayName:"AtomicURLCell__ClearFileButton",componentId:"sc-3973e396-6"})(["position:absolute;height:fit-content;top:","rem;right:","rem;"],e=>e.theme.margin,e=>e.theme.margin),W0e=A.img.withConfig({displayName:"AtomicURLCell__PreviewImg",componentId:"sc-3973e396-7"})(["height:100%;border-radius:",";"],e=>e.theme.radius);function V0e({value:e,onChange:t}){return c.jsx(cc,{autoFocus:!0,checked:e,onChange:t})}function q0e({value:e,onChange:t}){return c.jsx(cc,{checked:e,onChange:t})}const G0e={Edit:V0e,Display:q0e},zO=e=>{const t={hour:"numeric",minute:"numeric"},n={day:"numeric",year:"numeric"},r=new Intl.DateTimeFormat("default",t),i=new Intl.DateTimeFormat("default",{...n,...e?t:{},month:"long"}),o=new Intl.DateTimeFormat("default",{...n,...e?t:{},month:"numeric"});return{longDateFormatter:i,numericDateFormatter:o,timeFormatter:r}},dy=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),BO=60*1e3,HO=60*BO,K0e=24*HO;function Y0e(e,t){if(t){const o=X0e(e);if(o>=-60&&o<=60)return dy.format(o,"minute");const a=Q0e(e);if(a>=-12&&a<=12)return dy.format(a,"hour")}const{longDateFormatter:n,timeFormatter:r}=zO(t),i=J0e(e);if(i>=-3&&i<=3){const o=`${dy.format(i,"day")}`;return t?`${o} at ${r.format(e)}`:o}return n.format(e)}function X0e(e){return Math.round((e.getTime()-Date.now())/BO)}function Q0e(e){return Math.round((e.getTime()-Date.now())/HO)}function J0e(e){const t=new Date;t.setHours(0,0,0,0);const r=(e.getTime()-t.getTime())/K0e;return Math.floor(r)}const{instances:{dateFormats:fy}}=F;function Hu(e,t,n){const{longDateFormatter:r,numericDateFormatter:i}=zO(n);switch(e){case fy.localLong:return r.format(t);case fy.localNumeric:return i.format(t);case fy.localRelative:return Y0e(t,n);default:throw new Error(`Unknown formatting: ${e}`)}}const $c=A.input.withConfig({displayName:"InputBase",componentId:"sc-5cf37e3d-0"})(["position:absolute;inset:0;padding-inline:var(--table-inner-padding);background-color:",";color:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.text);function Z0e({value:e,onChange:t}){const[n,r]=h.useState(e),i=h.useCallback(o=>{r(o.target.value);try{za(o.target.value,Z.DATE),t(o.target.value)}catch{}},[t]);return h.useEffect(()=>{r(e)},[e]),c.jsx($c,{type:"date",value:n,autoFocus:!0,onChange:i})}const eve=(e,t)=>{if(ls(e)){const n=`${e}T00:00:00`,r=new Date(n);return Hu(t,r,!1)}};function tve({value:e,property:t}){const n=ae(t),[r]=re(n,F.properties.constraints.dateFormat),i=eve(e,r??F.instances.dateFormats.localNumeric);return c.jsx(c.Fragment,{children:i})}const nve={Edit:Z0e,Display:tve},_p=e=>`${e}`.padStart(2,"0"),rve=e=>{const t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),i=e.getHours(),o=e.getMinutes();return`${t}-${_p(n)}-${_p(r)}T${_p(i)}:${_p(o)}`};function ive({value:e,onChange:t}){const n=h.useCallback(i=>{const o=new Date(i.target.value);t(o.getTime())},[t]);let r;return Ym(e)&&(r=rve(new Date(e))),c.jsx($c,{type:"datetime-local",value:r,autoFocus:!0,onChange:n})}const py=(e,t,n)=>{if(Ym(e)){const r=new Date(e);return Hu(t,r,n)}};function ove({value:e,property:t}){const n=ae(t),[r]=re(n,F.properties.constraints.dateFormat),[i,o]=h.useState(()=>py(e,r??F.instances.dateFormats.localNumeric,!0));return h.useEffect(()=>{if(o(py(e,r??F.instances.dateFormats.localNumeric,!0)),r===F.instances.dateFormats.localRelative){const a=setInterval(()=>{o(py(e,F.instances.dateFormats.localRelative,!0))},6e4);return()=>clearInterval(a)}},[e,r]),c.jsx(c.Fragment,{children:i})}const ave={Edit:ive,Display:ove},UO=A.span.withConfig({displayName:"ProgressBar",componentId:"sc-818fe261-0"})(["--off:transparent;--on:",";position:absolute;background-image:",";height:4px;width:100%;left:0;bottom:0px;"],({theme:e})=>e.colors.main,e=>`linear-gradient(to right, var(--on), var(--on) ${e.percentage}%, var(--off) ${e.percentage}%)`);function WO(e,t,n,r){if(e===void 0)return"";const i=sve(t);if(n===F.instances.numberFormats.percentage)return new Intl.NumberFormat("default",{style:"percent",minimumFractionDigits:i}).format(e/100);if(n===F.instances.numberFormats.currency)try{return new Intl.NumberFormat("default",{style:"currency",currency:r,currencyDisplay:"narrowSymbol",currencySign:"accounting"}).format(e)}catch(a){return console.error(a),e.toString()}return new Intl.NumberFormat("default",{style:"decimal",minimumFractionDigits:i}).format(e)}function sve(e){if(e!==void 0)return Math.min(20,Math.max(0,e))}const{numberFormats:lve}=F.instances;function cve({value:e,onChange:t}){return c.jsx($c,{value:e,type:"number",autoFocus:!0,onChange:n=>{const r=Number.parseFloat(n.target.value);return Number.isNaN(r)?t(void 0):t(r)}})}function uve({value:e,property:t}){const n=ae(t),[r]=re(n,F.properties.constraints.numberFormatting),[i]=ao(n,F.properties.constraints.decimalPlaces),[o]=re(n,Be.properties.currency),a=r===lve.percentage,s=WO(e,i,r,o);return c.jsxs(c.Fragment,{children:[c.jsx(fve,{children:e!==void 0&&s}),a&&c.jsx(UO,{percentage:e})]})}const dve={Edit:cve,Display:uve},fve=A.span.withConfig({displayName:"FloatCell__Aligned",componentId:"sc-1c14da55-0"})(["text-align:end;display:inline-block;width:100%;"]),{numberFormats:pve}=F.instances;function hve({value:e,onChange:t}){return c.jsx($c,{value:e,type:"number",autoFocus:!0,onChange:n=>{const r=Number.parseInt(n.target.value);return Number.isNaN(r)?t(void 0):t(r)}})}function mve({value:e,property:t}){const n=ae(t),[r]=re(n,F.properties.constraints.numberFormatting),i=r===pve.percentage;return c.jsxs(c.Fragment,{children:[c.jsx(vve,{children:WO(e,0,r)}),i&&c.jsx(UO,{percentage:e})]})}const gve={Edit:hve,Display:mve},vve=A.span.withConfig({displayName:"IntegerCell__Aligned",componentId:"sc-9a72ed1a-0"})(["text-align:end;display:inline-block;width:100%;"]),uw="0.5rem",yve=[];function bve(e,t,n){return t.filter(r=>!n.includes(r)).map(r=>{const i=e.getResourceLoading(r),o=(i==null?void 0:i.get(ve.properties.shortname))??r;return{subject:r,title:o}})}function wve({value:e,property:t,onChange:n}){const r=e??yve,i=be(),o=ae(t),[a]=Se(o,ve.properties.allowsOnly),[s,u]=h.useState(""),l=h.useMemo(()=>bve(i,a,r).filter(b=>b.title.includes(s)).map(b=>b.subject),[i,a,r,s]),[d,f]=h.useState(!0),[m,g]=h.useState(0),{activeCellRef:y}=lr(),v=h.useMemo(()=>{const w=new Set([Ma.EditNextRow]);return d&&w.add(Ma.ExitEditMode),{disabledKeyboardInteractions:w,hideActiveIndicator:!0}},[r,d]);$O(v);const _=h.useCallback(w=>{u(Bs(w.target.value)),g(0)},[]),x=h.useCallback(w=>{n(Array.from(new Set([...r,w])))},[r,n]),S=h.useCallback(w=>{n(r.filter(b=>b!==w))},[r,n]),C=h.useCallback(w=>{g(b=>hg(b+w,l.length))},[l]);h.useEffect(()=>{var w;d||(w=y.current)==null||w.focus()},[d]);const p=h.useCallback(w=>{switch(w.key){case"ArrowUp":w.preventDefault(),C(-1);break;case"ArrowDown":w.preventDefault(),C(1);break;case"Enter":w.preventDefault(),x(l[m]);break;case"Escape":w.preventDefault(),f(!1);break}},[C,l,m,d]);return c.jsx(_ve,{children:c.jsxs(Le,{gap:uw,center:!0,wrapItems:!0,children:[r.map(w=>c.jsx(c3,{subject:w,children:c.jsx(Cve,{title:"remove tag",onClick:()=>S(w),children:c.jsx(lo,{})})},w)),c.jsx(a3,{defaultOpen:!0,noLock:!0,open:d,onOpenChange:f,Trigger:c.jsx(Wt,{title:"Add tag",as:wg,children:c.jsx(Sve,{})}),children:c.jsxs(kve,{onKeyDown:p,children:[c.jsx(Eve,{children:c.jsx(wt,{placeholder:"Filter tags...",onChange:_})}),c.jsx(jve,{children:c.jsx(Le,{wrapItems:!0,gap:uw,children:l.map((w,b)=>c.jsx(vK,{subject:w,onClick:x,selected:b===m},w))})})]})})]})})}function xve({value:e}){return e?c.jsx(Le,{gap:uw,children:e.map(t=>c.jsx(c3,{subject:t},t))}):c.jsx(c.Fragment,{})}const Sve=A(qn).withConfig({displayName:"ResourceArrayCell__StyledIcon",componentId:"sc-ab684b00-0"})(["animation:"," 0.1s ease-in-out;color:",";"],s3,e=>e.theme.colors.textLight),Cve=A(Wt).withConfig({displayName:"ResourceArrayCell__TagIconButton",componentId:"sc-ab684b00-1"})(["height:unset;width:unset;padding:unset;color:var(--tag-dark-color);background-blend-mode:lighten;&:not([disabled]):hover,&:not([disabled]):focus{transform:scale(1.2);background-color:unset;}"]),_ve=A.div.withConfig({displayName:"ResourceArrayCell__AbsoluteCell",componentId:"sc-ab684b00-2"})(["position:absolute;display:flex;align-items:center;z-index:10;left:0;top:0;background-color:",";box-shadow:",";border:2px solid ",";height:fit-content;width:100%;padding-inline:var(--table-inner-padding);padding-block:3px;min-height:40px;"],e=>e.theme.colors.bg,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),kve=A.div.withConfig({displayName:"ResourceArrayCell__Content",componentId:"sc-ab684b00-3"})(["width:min(40ch,90vh);border-radius:",";"],e=>e.theme.radius),jve=A.div.withConfig({displayName:"ResourceArrayCell__ResultWrapper",componentId:"sc-ab684b00-4"})(["padding:","rem;"],e=>e.theme.margin),Eve=A(ht).withConfig({displayName:"ResourceArrayCell__SearchInputWrapper",componentId:"sc-ab684b00-5"})(["border-bottom-left-radius:0;border-bottom-right-radius:0;"]),Rve={Edit:wve,Display:xve};function Pve({value:e,onChange:t}){const n=h.useCallback(r=>{const i=r.target.value.toLowerCase().replace(/\s/g,"-");t(i)},[t]);return c.jsx($c,{value:e,autoFocus:!0,onChange:n})}function Ave({value:e}){return c.jsx(c.Fragment,{children:e})}const Ive={Edit:Pve,Display:Ave};function Tve({value:e,onChange:t}){return c.jsx($c,{value:e,autoFocus:!0,onChange:n=>t(n.target.value)})}function Ove({value:e}){return c.jsx(c.Fragment,{children:e})}const VO={Edit:Tve,Display:Ove},Lc=new Map([[Z.STRING,rS],[Z.SLUG,rS],[Z.MARKDOWN,DU],[Z.ATOMIC_URL,sg],[Z.INTEGER,Es],[Z.FLOAT,Es],[Z.RESOURCEARRAY,lW],[Z.BOOLEAN,zU],[Z.DATE,FU],[Z.TIMESTAMP,Mx]]),Dve=new Map([[Z.STRING,VO],[Z.SLUG,Ive],[Z.ATOMIC_URL,M0e],[Z.RESOURCEARRAY,Rve],[Z.INTEGER,gve],[Z.FLOAT,dve],[Z.BOOLEAN,G0e],[Z.TIMESTAMP,ave],[Z.DATE,nve]]),Nve=new Map([[Z.INTEGER,Gl.End],[Z.FLOAT,Gl.End],[Z.DATE,Gl.End]]),bk=e=>{try{return new URL(e),!0}catch{return!1}};function qO(e,t,n){const r=e??"";switch(n){case Z.STRING:case Z.SLUG:case Z.MARKDOWN:return`${r}${t}`;case Z.INTEGER:return Number.parseInt(`${r}${Number.isNaN(Number.parseInt(t))?"":t}`);case Z.FLOAT:return Number.parseFloat(`${r}${Number.isNaN(Number.parseFloat(t))?"":t}`);case Z.ATOMIC_URL:return bk(t)?t:e;case Z.TIMESTAMP:return Number.isNaN(Number.parseInt(t,10))?e:Number.parseInt(t,10);case Z.DATE:return/^\d{4}-\d{2}-\d{2}/.test(t)?t:e;case Z.RESOURCEARRAY:{const i=t.split(",");return i.every(bk)?i:e}case Z.BOOLEAN:return t==="true"||t==="false"?t==="true":void 0;default:return e}}function Mve(e,t){return n=>e.get(n)??t}function $ve({resource:e}){const t=be();return h.useEffect(()=>{e.set(F.properties.datatype,F.datatypes.boolean,t)},[]),c.jsx(c.Fragment,{})}function Eo({children:e,disabled:t,...n}){return c.jsxs(Lve,{"aria-disabled":t,children:[c.jsx(Fve,{type:"radio",...n,disabled:t}),e]})}const Lve=A.label.withConfig({displayName:"RadioInput__Label",componentId:"sc-74a43bf8-0"})(["display:grid;grid-template-columns:1em auto;gap:0.5rem;line-height:1;&:not([aria-disabled='true']){cursor:pointer;}&[aria-disabled='true']{color:",";}&:focus-within{color:",";}transition:",";"],e=>e.theme.colors.textLight,e=>e.theme.colors.main,Wn("color")),Fve=A.input.withConfig({displayName:"RadioInput__Input",componentId:"sc-74a43bf8-1"})(["display:grid;transform:translateY(-0.15em);place-items:center;appearance:none;margin:0;width:1.15em;background-color:",";border:solid 1px ",";border-radius:50%;aspect-ratio:1/1;transition:",";&:not(:disabled):checked,&:not(:disabled):hover{border-color:",";}&::before{content:'';background-color:",";width:75%;aspect-ratio:1/1;border-radius:50%;transform:scale(0);transition:",";}&:disabled::before{background-color:",";}&:checked::before{transform:scale(1);}&:not(:disabled){cursor:pointer;}&:focus{outline-color:",";}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,Wn("border-color"),e=>e.theme.colors.main,e=>e.theme.colors.main,Wn("transform"),e=>e.theme.colors.bg2,e=>e.theme.colors.main),GO=A.div.withConfig({displayName:"RadioInput__RadioGroup",componentId:"sc-74a43bf8-2"})(["display:flex;flex-direction:column;gap:0.5rem;"]),{instances:{dateFormats:ii}}=F,zve=1e3*60*60*15,hy=new Date(Date.now()-zve);function Bve({value:e,onChange:t,withTime:n=!1}){return c.jsxs(Hve,{children:[c.jsxs(my,{children:[c.jsx(Eo,{type:"radio",name:"date-format",value:ii.localNumeric,checked:e===ii.localNumeric,onChange:()=>t(ii.localNumeric),children:"Numeric"}),c.jsx(gy,{children:Hu(ii.localNumeric,hy,n)})]}),c.jsxs(my,{children:[c.jsx(Eo,{type:"radio",name:"date-format",value:ii.localLong,checked:e===ii.localLong,onChange:()=>t(ii.localLong),children:"Long"}),c.jsx(gy,{children:Hu(ii.localLong,hy,n)})]}),c.jsxs(my,{children:[c.jsx(Eo,{type:"radio",name:"date-format",value:ii.localRelative,checked:e===ii.localRelative,onChange:()=>t(ii.localRelative),children:"Relative"}),c.jsx(gy,{children:Hu(ii.localRelative,hy,n)})]})]})}const Hve=A.div.withConfig({displayName:"DateFormatPicker__Wrapper",componentId:"sc-292097ab-0"})(["display:flex;flex-direction:column;border:1px solid ",";border-radius:",";"],e=>e.theme.colors.bg2,e=>e.theme.radius),my=A.div.withConfig({displayName:"DateFormatPicker__OptionWrapper",componentId:"sc-292097ab-1"})(["padding:","rem;&:not(:last-child){border-bottom:1px solid ",";}"],e=>e.theme.margin,e=>e.theme.colors.bg2),gy=A.span.withConfig({displayName:"DateFormatPicker__FormattedDate",componentId:"sc-292097ab-2"})(["color:",";font-style:italic;"],e=>e.theme.colors.textLight);function Uve({resource:e}){const t=be(),[n,r]=h.useState(e.get(F.properties.datatype)===F.datatypes.timestamp),[i,o]=re(e,F.properties.constraints.dateFormat,{commit:!0});return h.useEffect(()=>{const a=n?F.datatypes.timestamp:F.datatypes.date;(async()=>(await e.set(F.properties.datatype,a,t),await e.set(F.properties.isA,[F.classes.constraintProperties.formattedDate],t),i===void 0&&await e.set(F.properties.constraints.dateFormat,F.instances.dateFormats.localNumeric,t)))()},[i,t,n]),c.jsxs(h.Suspense,{children:[c.jsxs(X2,{children:[c.jsx(cc,{onChange:r,checked:n}),"Include Time"]}),c.jsx(Bve,{value:i,onChange:o,withTime:n})]})}function Wve({resource:e}){const t=be();return h.useEffect(()=>{e.set(F.properties.datatype,F.datatypes.atomicUrl,t),e.set(F.properties.classType,F.classes.file,t)},[]),c.jsx(c.Fragment,{})}const Md=A.h2.withConfig({displayName:"FormGroupHeading",componentId:"sc-52a3f924-0"})(["font-size:1.1rem;margin-bottom:0.2rem;font-family:",";font-weight:bold;"],e=>e.theme.fontFamilyHeader);function Vve({resource:e}){const t=h.useId(),[n,r,i]=Ws(),[o,a]=re(e,F.properties.datatype,{commit:!0}),[s,u]=ao(e,F.properties.constraints.decimalPlaces,{commit:!0}),l=h.useCallback(async d=>{const f=d.target.value,m=Number.parseInt(f,10);if(m<0||m>20){r("Value must be between 0 and 20.",!0);return}else r(void 0);if(m===0?await a(F.datatypes.integer):await a(F.datatypes.float),isNaN(m))return await u(void 0);u(m)},[r]);return c.jsxs(c.Fragment,{children:[c.jsx(Md,{as:"label",htmlFor:t,children:"Decimal Places"}),c.jsxs("div",{children:[c.jsx(ht,{$invalid:n!==void 0,children:c.jsx(wt,{id:t,type:"number",defaultValue:s,min:0,max:20,onBlur:i,onChange:l})}),n&&c.jsx(Rc,{children:n})]})]})}const wk=(e,t)=>{const n=Number.parseFloat(e);if(!Number.isNaN(n))return t?Math.floor(n):n};function qve(e,t,n=!1){let r;return e!==void 0&&n&&(r=Number.isInteger(e)?void 0:"Value should be a round number."),t!==void 0&&n&&(r=Number.isInteger(e)?void 0:"Value should be a round number."),e!==void 0&&t!==void 0&&(r=e<t?void 0:"Min must be a less than max"),r}function Gve({round:e=!1,minValue:t,maxValue:n,invalid:r,onBlur:i,onChange:o}){const a=h.useCallback(u=>{const l=wk(u.target.value,e);o(l,n)},[o,n]),s=h.useCallback(u=>{const l=wk(u.target.value,e);o(t,l)},[o,t]);return c.jsxs(Le,{center:!0,gap:"0.5rem",children:[c.jsx(ht,{$invalid:r,children:c.jsx(wt,{type:"number",max:n,placeholder:"min",defaultValue:t,onBlur:i,onChange:a})})," - ",c.jsx(ht,{$invalid:r,children:c.jsx(wt,{type:"number",placeholder:"max",min:t,defaultValue:n,onBlur:i,onChange:s})})]})}function KO({resource:e,minProp:t,maxProp:n,constraintClass:r}){const i=be(),[o,a]=ao(e,t),[s,u]=ao(e,n),[l,d,f]=Ws(),m=h.useCallback((g,y)=>{a(g),u(y),g!==void 0||y!==void 0?e.addClasses(i,r):e.removeClasses(i,r);const v=qve(g,y,!0);d(v),v||e.save(i)},[a,u,i,e]);return c.jsxs("div",{children:[c.jsx(Gve,{round:!0,maxValue:s,minValue:o,invalid:!!l,onBlur:f,onChange:m}),l&&c.jsx(Rc,{children:l})]})}const{numberFormats:Qo}=F.instances,Kve=h.lazy(()=>Sg(()=>import("./chunk_CurrencyPicker.js"),__vite__mapDeps([]))),Yve=({resource:e})=>{const t=be(),[n,r]=re(e,Be.properties.numberFormatting),[i]=ao(e,Be.properties.decimalPlaces),[o,a]=re(e,ve.properties.datatype),s=async u=>{r(u.target.value),u.target.value===Qo.currency?(await e.addClasses(t,Be.classes.currencyProperty),await a(F.datatypes.float)):(await e.removeClasses(t,Be.classes.currencyProperty),e.removePropVal(Be.properties.currency))};return h.useEffect(()=>{e.addClasses(t,Be.classes.formattedNumber),i===void 0&&e.set(ve.properties.datatype,F.datatypes.float,t),n===void 0&&r(Qo.number)},[]),c.jsxs(h.Suspense,{fallback:c.jsx("div",{children:"loading..."}),children:[c.jsx(Md,{children:"Number Format"}),c.jsxs(GO,{children:[c.jsx(Eo,{name:"number-format",value:Qo.number,checked:n===Qo.number,onChange:s,children:"Number"}),c.jsx(Eo,{name:"number-format",value:Qo.percentage,checked:n===Qo.percentage,onChange:s,children:"Percentage"}),c.jsx(Eo,{name:"number-format",value:Qo.currency,checked:n===Qo.currency,onChange:s,children:"Currency"})]}),e.hasClasses(Be.classes.currencyProperty)?c.jsx(Kve,{resource:e}):c.jsx(Vve,{resource:e}),c.jsx(Md,{children:"Range"}),c.jsx(KO,{resource:e,minProp:Be.properties.min,maxProp:Be.properties.max,constraintClass:Be.classes.rangeProperty})]})},Xve={commit:!1};function Qve({resource:e}){const t=be(),[n,r]=re(e,F.properties.classType,Xve);return h.useEffect(()=>{e.set(F.properties.datatype,F.datatypes.atomicUrl,t)},[]),c.jsx(c.Fragment,{children:c.jsxs(Jve,{as:"label",children:[c.jsx("strong",{children:"Resource type:"}),c.jsx(Ho,{isA:F.classes.class,value:n,setSubject:r})]})})}const Jve=A.label.withConfig({displayName:"RelationPropertyForm__Label",componentId:"sc-e3e910ab-0"})(["display:flex;flex-direction:column;gap:0.5rem;cursor:pointer;"]),xk={commit:!1,validate:!1};function Sk(e,t){return e.filter(n=>n!==t)}function Zve({resource:e}){const t=be(),[n,r]=Se(e,F.properties.allowsOnly,xk),[i,o]=Se(e,F.properties.subResources,xk),a=h.useCallback(async u=>{await r([...n,u.getSubject()]),await o([...i,u.getSubject()]),await u.save(t)},[n,r,i,o,t]),s=h.useCallback(async u=>{t.getResourceLoading(u).destroy(t),await r(Sk(n,u)),await o(Sk(i,u))},[t,r,o,n,i]);return h.useEffect(()=>{e.addClasses(t,F.classes.constraintProperties.selectProperty),e.set(F.properties.datatype,F.datatypes.resourceArray,t)},[]),c.jsxs(c.Fragment,{children:[c.jsx(Le,{wrapItems:!0,children:n.map(u=>c.jsx(JR,{subject:u,onDelete:s},u))}),c.jsx(tP,{parent:e.getSubject(),onNewTag:a})]})}const e1e=({resource:e})=>{const t=be(),[n,r]=h.useState(Z.STRING),i=async o=>{r(o.target.value),await e.set(F.properties.datatype,o.target.value,t,!1),await e.save(t)};return c.jsxs(c.Fragment,{children:[c.jsx(Md,{children:"Text Format:"}),c.jsxs(GO,{children:[c.jsx(Eo,{name:"text-format",value:Z.STRING,checked:n===Z.STRING,onChange:i,children:"Plain text"}),c.jsx(Eo,{name:"text-format",value:Z.MARKDOWN,checked:n===Z.MARKDOWN,onChange:i,children:"Rich text"}),c.jsx(Eo,{name:"text-format",value:Z.SLUG,checked:n===Z.SLUG,onChange:i,children:"Slug"})]}),c.jsx(Md,{children:"Length"}),c.jsx(KO,{resource:e,minProp:F.properties.constraints.min,maxProp:F.properties.constraints.max,constraintClass:F.classes.constraintProperties.rangeProperty})]})},t1e=e=>{switch(e){case F.datatypes.string:case F.datatypes.markdown:case F.datatypes.slug:return"text";case F.datatypes.integer:case F.datatypes.float:return"number";case F.datatypes.boolean:return"checkbox";case F.datatypes.date:case F.datatypes.timestamp:return"date";case F.datatypes.resourceArray:return"select";case F.datatypes.atomicUrl:return"relation"}throw new Error(`Unknown datatype: ${e}`)},n1e=()=>c.jsx("span",{children:"No Type selected"}),r1e=Mve(new Map([["text",e1e],["number",Yve],["checkbox",$ve],["select",Zve],["date",Uve],["file",Wve],["relation",Qve]]),n1e);function YO({resource:e,onSubmit:t,category:n}){const[r,i,o]=Ws("Required"),a=h.useMemo(()=>({handleValidationError(y){i(y?"Invalid Name":void 0)}}),[]),[s,u]=re(e,F.properties.name,a),[l,d]=re(e,F.properties.shortname,a),f=h.useCallback(y=>{const v=y.target.value,_=Bs((v??"").trim());u(v),d(_)},[u,d]),m=h.useCallback(y=>{y.preventDefault(),t()},[t]);h.useEffect(()=>{s&&i(void 0)},[]);const g=r1e(n);return c.jsxs(i1e,{onSubmit:m,children:[c.jsxs("div",{children:[c.jsx(ht,{$invalid:!!r,children:c.jsx(wt,{id:"name-form",type:"text",value:s,onChange:f,placeholder:"New Column",onBlur:o})}),r&&c.jsx(Rc,{children:r})]}),c.jsx(g,{resource:e}),c.jsx(o1e,{type:"submit"})]})}const i1e=A.form.withConfig({displayName:"PropertyForm__Form",componentId:"sc-3f696d61-0"})(["display:flex;flex-direction:column;gap:1rem;"]),o1e=A.button.withConfig({displayName:"PropertyForm__HiddenSubmitButton",componentId:"sc-3f696d61-1"})(["display:none;"]);function a1e({resource:e,showDialog:t,bindShow:n}){const r=be(),[i,o]=h.useState(!0),[a]=re(e,K.datatype),s=t1e(a),u=h.useCallback(()=>{e.save(r)},[e]),[l,d,f]=Cr({bindShow:n,onSuccess:u});h.useEffect(()=>{t?d():f()},[t]);const m=h.useCallback(()=>{f(!0)},[f]);return c.jsx(Hg,{onValidationChange:o,children:c.jsxs(_r,{...l,children:[c.jsx(bi,{children:c.jsx("h1",{children:"Edit Column"})}),c.jsx(Xr,{children:c.jsx(YO,{resource:e,category:s,onSubmit:m})}),c.jsx(Wi,{children:c.jsx(ue,{onClick:m,disabled:!i,children:"Save"})})]})})}const Fc=h.createContext({tableClassSubject:Nt,sorting:{prop:"",sortDesc:!0},setSortBy:()=>{},addItemsToHistoryStack:()=>{}}),s1e=ef(c.jsx(ag,{}),"Edit column"),l1e=e=>{const{tableClassSubject:t}=h.useContext(Fc),[n]=re(e,K.parent);return n!==t};function c1e({resource:e}){const t=be(),n=Sr(e),[r,i]=h.useState(!1),[o,a]=h.useState(!1),{tableClassSubject:s}=h.useContext(Fc),u=ae(s),l=xt(),d=l1e(e),f=h.useCallback(async()=>{const v=u.getArray(ve.properties.recommends),_=u.getArray(ve.properties.requires);await u.set(ve.properties.recommends,v.filter(x=>x!==e.getSubject()),t),await u.set(ve.properties.requires,_.filter(x=>x!==e.getSubject()),t),await u.save(t)},[t,u,e]),m=h.useCallback(async()=>{await f(),e.destroy(t)},[f,t]),g=h.useCallback(()=>{d?f():m()},[m,f,d]),y=h.useMemo(()=>{const v=[{id:"edit",label:"Edit",onClick:()=>i(!0),icon:c.jsx(Ha,{}),disabled:!n||d},{id:"view",label:"View",onClick:()=>{l(mt(e.getSubject()))},icon:c.jsx(vd,{})}];return d?v.push({id:"remove",label:"Remove",onClick:()=>a(!0),icon:c.jsx(lo,{}),disabled:!n}):v.push({id:"delete",label:"Delete",onClick:()=>a(!0),icon:c.jsx(Ls,{}),disabled:!n}),v},[]);return c.jsxs(u1e,{children:[c.jsx(mg,{trigger:s1e,items:y}),c.jsx(a1e,{resource:e,showDialog:r,bindShow:i}),c.jsx(qR,{title:d?"Remove column":"Delete column",confirmLabel:d?"Remove":"Delete",show:o,bindShow:a,theme:om.Alert,onConfirm:g,children:d?c.jsxs("p",{children:["Remove ",c.jsx(Ft,{subject:e.getSubject()})," from this table"]}):c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["Are you sure you want to delete this column?",c.jsx("br",{}),"This will delete the"," ",c.jsx(Ft,{subject:e.getSubject()})," property and its children."]}),c.jsx(f3,{resource:e})]})})]})}const u1e=A.div.withConfig({displayName:"TableHeadingMenu__Wrapper",componentId:"sc-b970bcfb-0"})(["margin-left:auto;& > button{color:",";}"],e=>e.theme.colors.textLight);function d1e(e,t,n,r){return t.prop===e.getSubject()?t.sortDesc?NU:MU:n?w0e:Lc.get(r)??Dx}const f1e=({column:e,dragListeners:t,dragAttributes:n})=>{const[r,i]=h.useState(!1),o=ae(e.subject),[a]=nt(o),{setSortBy:s,sorting:u}=h.useContext(Fc),l=d1e(o,u,r,e.datatype),d=u.prop===o.getSubject(),f=a||e.shortname;return c.jsx(c.Fragment,{children:c.jsxs(p1e,{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[c.jsx(m1e,{...t,...n,children:c.jsx(l,{title:"Drag column"})}),c.jsx(h1e,{onClick:()=>s(o.getSubject()),bold:d,title:f,children:c.jsx("span",{"aria-hidden":!0,children:f})}),c.jsx(c1e,{resource:o})]})})},p1e=A.div.withConfig({displayName:"TableHeading__Wrapper",componentId:"sc-23ddb6a8-0"})(["display:flex;align-items:center;gap:0.5rem;width:100%;"]),h1e=A.button.withConfig({displayName:"TableHeading__NameButton",componentId:"sc-23ddb6a8-1"})(["background:none;border:none;color:currentColor;cursor:pointer;font-weight:",";overflow:hidden;text-overflow:ellipsis;padding:0;"],e=>e.bold?"bold":"normal"),m1e=A.button.withConfig({displayName:"TableHeading__DragIconButton",componentId:"sc-23ddb6a8-2"})(["background:none;color:currentColor;display:flex;align-items:center;border:none;height:1rem;padding:0;cursor:grab;&:active{cursor:grabbing;}svg{color:currentColor;max-width:1rem;min-width:1rem;flex:1;}"]),Ck={commit:!0};function g1e(e){const t=be(),[n,r]=Se(e,F.properties.requires,Ck),[i,o]=Se(e,F.properties.recommends,Ck),[a,s]=h.useState([]),u=h.useCallback(async(l,d)=>{const m=b0e(a,l,d).map(v=>v.subject),g=m.filter(v=>n.includes(v)),y=m.filter(v=>i.includes(v));await r(g),await o(y)},[n,i,o,r,a]);return h.useEffect(()=>{const l=[...n,...i];Promise.all(l.map(d=>t.getProperty(d))).then(d=>{s(d)})},[n,i]),{columns:a,reorderColumns:u}}var _k;(function(e){e[e.ValueChange=0]="ValueChange",e[e.ResourceCreated=1]="ResourceCreated",e[e.ResourceDeleted=2]="ResourceDeleted"})(_k||(_k={}));const XO=e=>!Array.isArray(e)&&e.type===0,v1e=e=>!Array.isArray(e)&&e.type===1;function _4(e,t){return{type:0,subject:e.getSubject(),property:t,previousValue:e.get(t)}}function y1e(e){return{type:1,subject:e.getSubject()}}function b1e(e){return{type:2,subject:e.getSubject(),propVals:e.getPropVals()}}async function w1e(e,t){const n=t.getResourceLoading(e.subject);await n.set(e.property,e.previousValue,t,!1),await n.save(t)}async function x1e(e,t){return await t.getResourceLoading(e.subject).destroy(t),!0}async function S1e(e,t){const n=t.getResourceLoading(e.subject,{newResource:!0});for(const[r,i]of e.propVals)await n.set(r,i,t,!1);return await n.save(t),!0}async function kk(e,t){switch(e.type){case 0:return w1e(e,t);case 1:return x1e(e,t);case 2:return S1e(e,t)}}const C1e=(e,t)=>{const n=XO(t)&&t.subject===e.subject&&t.property===e.property,r=v1e(t)&&t.subject===e.subject;return n||r};function _1e(e,t){const n=t[t.length-1];return n&&XO(e)&&C1e(e,n)?t:[...t,e]}function k1e(e,t){return[...t,e]}function j1e(e){const t=be(),[n,r]=h.useState([]),i=h.useCallback(a=>{r(s=>Array.isArray(a)?k1e(a,s):_1e(a,s))},[]),o=h.useCallback(async()=>{const a=n[n.length-1];let s=!1;if(a){if(Array.isArray(a))for(const u of a)await kk(u,t)&&(s=!0);else await kk(a,t)&&(s=!0);r(u=>u.slice(0,u.length-1)),s&&e()}},[n,t,e]);return{addItemsToHistoryStack:i,undoLastItem:o}}function E1e(e,t){const{cursorMode:n,selectedColumn:r,selectedRow:i}=lr();return n===je.Edit&&r===t&&i===e}const R1e={commitDebounce:0,commit:!1,validate:!1};function P1e({columnIndex:e,rowIndex:t,resource:n,property:r,invalidateTable:i}){const o=be(),[a,s]=h.useState(!1),{setActiveCell:u}=lr(),{addItemsToHistoryStack:l}=h.useContext(Fc),[d,f]=n9(async()=>{await n.save(o)},200,[n,o]),[m,g]=io(n,r.subject,R1e),[y,v]=io(n,F.properties.commit.createdAt,{commit:!1,commitDebounce:0}),_=r.datatype,x=E1e(t,e),S=h.useMemo(()=>Dve.get(_)??VO,[_]),C=Nve.get(_)??Gl.Start,p=h.useCallback(async k=>{y||(await v(Date.now()),s(!0)),l(_4(n,r.subject)),await g(k),d()},[g,v,y,n,r,d]),w=h.useCallback(k=>{p(qO(void 0,k,_))},[p,_]),b=h.useCallback(()=>{a&&!f&&h.startTransition(()=>{s(!1),i==null||i(),setTimeout(()=>{u(t+1,e)},0)})},[a,f,i,u,t,e]);return h.useEffect(()=>{a&&!x&&!f&&h.startTransition(()=>{s(!1),i==null||i()})},[x,a,f,i]),c.jsx(w4,{rowIndex:t,columnIndex:e,align:C,onEnterEditModeWithCharacter:w,onEditNextRow:b,children:x?c.jsx(S.Edit,{value:m,onChange:p,property:r.subject,resource:n}):c.jsx(c.Fragment,{children:c.jsx(S.Display,{value:m,onChange:p,property:r.subject})})})}const QO=h.memo(P1e);function A1e({collection:e,index:t,columns:n}){const r=_x(e,t);return r.getSubject()===Nt?c.jsx(c.Fragment,{children:n.map((i,o)=>c.jsx(JO,{delay:o*100,title:"loading"},i.subject))}):c.jsx(c.Fragment,{children:n.map((i,o)=>c.jsx(QO,{rowIndex:t,columnIndex:o+1,resource:r,property:i},i.subject))})}const I1e={newResource:!0};function T1e({index:e,columns:t,parent:n,invalidateTable:r}){const i=be(),[o]=h.useState(()=>sP(n.getSubject(),"row")),[a,s]=h.useState(!0),u=ae(o,I1e);return h.useEffect(()=>{u.getSubject()!==Nt&&u.set(F.properties.parent,n.getSubject(),i).then(()=>u.set(F.properties.isA,[n.get(F.properties.classType)],i)).then(()=>{s(!1)})},[u.getSubject()]),a?c.jsx(c.Fragment,{children:t.map((l,d)=>c.jsx(JO,{delay:d*100},l.subject))}):c.jsx(c.Fragment,{children:t.map((l,d)=>c.jsx(QO,{rowIndex:e,columnIndex:d+1,resource:u,property:l,invalidateTable:r},l.subject))})}const O1e=$o(["from{background-color:var(--from-color);}to{background-color:var(--to-color);}"]),JO=A.div.withConfig({displayName:"TableRow__Loader",componentId:"sc-2714f640-0"})(["width:100%;--from-color:",";--to-color:",";animation:0.8s ","ms ease-in-out infinite alternate ",";"],e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.delay,O1e),D1e=F.properties.commit.createdAt,N1e=30,jk={prop:D1e,sortDesc:!1},M1e=()=>h.useReducer((e,t)=>e.prop===t&&e.sortDesc?jk:e.prop===t?{...e,sortDesc:!0}:{prop:t,sortDesc:!1},jk);function $1e(e){const[t,n]=M1e(),[r]=oo(e,F.properties.classType),i=ae(r),o=h.useMemo(()=>({property:F.properties.parent,value:e.getSubject(),sort_by:t.prop,sort_desc:t.sortDesc}),[e.getSubject(),t.prop,t.sortDesc]);return{tableClass:i,sorting:t,setSortBy:n,...jo(o,N1e)}}const L1e=e=>{const t=e.endsWith("/")?"":"/";return`${e}${t}property-${h3(8)}`},F1e=async(e,t,n)=>{await e.set(F.properties.isA,[F.classes.property],n),await e.set(F.properties.parent,t.getSubject(),n),await e.set(F.properties.shortname,"new-column",n,!1),await e.set(F.properties.name,"",n,!1),await e.set(F.properties.description,"A column in a table",n),await e.set(F.properties.datatype,F.datatypes.string,n),await e.save(n)},ZO=(e,t)=>e.clientSideQuery(n=>n.get(F.properties.parent)===(t==null?void 0:t.getSubject())),z1e=async(e,t)=>{const n=ZO(e,t);await Promise.all(n.map(r=>{try{r.destroy(e)}catch{return}}))},B1e=async(e,t)=>{const n=ZO(e,t);await Promise.all(n.map(r=>r.save(e)))};function H1e({showDialog:e,selectedCategory:t,tableClassResource:n,bindShow:r}){const[i,o]=h.useState(!1),a=be(),[s,u]=h.useState(null),[l,d,f]=Se(n,F.properties.recommends,{commit:!0}),m=h.useCallback(async()=>{if(s)try{await z1e(a,s),await s.destroy(a)}finally{u(null)}},[s,a]),g=h.useCallback(async()=>{s&&(await s.save(a),await B1e(a,s),await a.notifyResourceManuallyCreated(s),await f([s.getSubject()]),u(null))},[s,a,n,f]),[y,v,_]=Cr({bindShow:r,onCancel:m,onSuccess:g}),x=async()=>{const p=L1e(n.getSubject()),w=a.getResourceLoading(p,{newResource:!0});await F1e(w,n,a),u(w)},S=h.useCallback(()=>{_()},[_]),C=h.useCallback(()=>{i&&_(!0)},[_,i]);return h.useEffect(()=>{e&&x().then(()=>{v()})},[e]),s?c.jsx(Hg,{onValidationChange:o,children:c.jsxs(_r,{...y,children:[c.jsx(bi,{children:c.jsxs("h1",{children:["New ",c.jsx(U1e,{children:t})," Column"]})}),c.jsx(Xr,{children:c.jsx(YO,{resource:s,category:t,onSubmit:C})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:S,subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:C,disabled:!i,type:"submit",children:"Create"})]})]})}):c.jsx(c.Fragment,{})}const U1e=A("span").withConfig({displayName:"NewPropertyDialog__Capitalize",componentId:"sc-f39f4c11-0"})(["text-transform:capitalize;"]);function W1e({open:e,bindShow:t,tableClassResource:n}){const[r,i]=h.useState(),[o,a]=h.useState(!1),[s,u]=Se(n,F.properties.recommends,{commit:!0}),[l,d,f]=Cr({bindShow:t}),m=()=>{r&&(u([...s,r]),f())};return h.useEffect(()=>{e&&(d(),i(void 0))},[e,d]),c.jsx(_r,{...l,children:c.jsxs(Hg,{onValidationChange:a,children:[c.jsx(bi,{children:c.jsx("h1",{children:"Add external property"})}),c.jsx(Xr,{children:c.jsx(Ho,{required:!0,hideCreateOption:!0,setSubject:i,value:r,isA:F.classes.property})}),c.jsxs(Wi,{children:[c.jsx(ue,{subtle:!0,onClick:()=>f(),children:"Cancel"}),c.jsx(ue,{disabled:!o,onClick:m,children:"Add"})]})]})})}const V1e=ef(c.jsx(qn,{}),"Add column"),q1e=Lc.get(Z.STRING),G1e=Lc.get(Z.INTEGER),K1e=Lc.get(Z.DATE),Y1e=Lc.get(Z.BOOLEAN),X1e=HU,Q1e=Bx,J1e=Lc.get(Z.ATOMIC_URL);function Z1e(){const[e,t]=h.useState(!1),[n,r]=h.useState(!1),[i,o]=h.useState(),{tableClassSubject:a}=h.useContext(Fc),s=ae(a),u=h.useCallback(d=>()=>{o(d),t(!0)},[]),l=h.useMemo(()=>[{id:"text",label:"Text",onClick:u("text"),icon:c.jsx(q1e,{})},{id:"number",label:"Number",onClick:u("number"),icon:c.jsx(G1e,{})},{id:"date",label:"Date",onClick:u("date"),icon:c.jsx(K1e,{})},{id:"checkbox",label:"Checkbox",onClick:u("checkbox"),icon:c.jsx(Y1e,{})},{id:"select",label:"Select",onClick:u("select"),icon:c.jsx(X1e,{})},{id:"file",label:"File",onClick:u("file"),icon:c.jsx(Q1e,{})},{id:"relation",label:"Relation",onClick:u("relation"),icon:c.jsx(J1e,{})},Zh,{id:"external",label:"External Property",onClick:()=>r(!0),icon:c.jsx(Es,{})}],[]);return c.jsxs(c.Fragment,{children:[c.jsx(mg,{trigger:V1e,items:l}),c.jsx(H1e,{showDialog:e,tableClassResource:s,selectedCategory:i,bindShow:t}),c.jsx(W1e,{open:n,tableClassResource:s,bindShow:r})]})}function eye(e,t,n,r,i){const o=be();return h.useCallback(async a=>{const s=[],u=new Map;let l=!1;for(const d of a){let f=u.get(d.index[0]);if(!f){let y;try{y=await t.getMemberWithIndex(d.index[0])}catch{}y?f=await o.getResourceAsync(y):(l=!0,f=o.getResourceLoading(sP(e.getSubject(),"row"),{newResource:!0}),await f.set(K.isA,[n.getSubject()],o),await f.set(K.commit.createdAt,Date.now(),o),await f.set(K.parent,e.getSubject(),o),s.push(y1e(f)))}const m=d.index[1];s.push(_4(f,m.subject));const g=qO(void 0,d.data,m.datatype);await f.set(m.subject,g,o),await f.save(o),u.set(d.index[0],f)}i(s),l&&r()},[t,r,o])}const tye={commit:!0,commitDebounce:1e3};function nye(e){const[t,n]=re(e,F.properties.table.tableColumnWidths,tye),r=h.useCallback(async a=>{const s=JSON.stringify(a);n(s)},[n]),i=h.useDeferredValue(t);return[h.useMemo(()=>{const a=JSON.parse(i??"[]");return a.length>0?a:void 0},[i]),r]}const eD=async(e,t)=>{const n={};for(const[r,i]of e){const o=await t.getMemberWithIndex(r);n[o]=[...n[o]??[],i]}return n};function rye(e,t){const n=be();return h.useCallback(async r=>{const i=await eD(r,e),o=[],a=async([s,u])=>{const l=await n.getResourceAsync(s);await Promise.all(u.map(d=>(o.push(_4(l,d.subject)),l.set(d.subject,void 0,n,!1)))),await l.save(n)};await Promise.all(Array.from(Object.entries(i)).map(a)),t(o)},[n,e])}const iye=e=>e.get(K.name)??e.get(K.file.filename)??e.get(K.shortname)??e.getSubject(),oye=e=>Array.isArray(e)?e.join(", "):`${e??""}`,tD=async(e,t)=>{if(e===void 0)return{plain:"",html:""};const n=await t.getResourceAsync(e),r=iye(n);return{plain:r,html:`<a href="${e}">${r}</a>`}},aye=async(e,t)=>{if(!e)return{plain:"",html:""};const n=await Promise.all(e.map(async r=>tD(r,t)));return{plain:n.map(r=>r.plain).join(", "),html:n.map(r=>r.html).join(", ")}},sye=async(e,t,n)=>{switch(t.datatype){case Z.ATOMIC_URL:return tD(e.get(t.subject),n);case Z.RESOURCEARRAY:return aye(e.get(t.subject),n);default:{const r=oye(e.get(t.subject));return{plain:r,html:r}}}},lye=async(e,t,n)=>{const r=await n.getResourceAsync(e);return Promise.all(t.map(i=>sye(r,i,n)))};function cye(e){const t=be();return h.useCallback(async n=>{const r=await eD(n,e),i=Array.from(Object.entries(r)).map(([o,a])=>lye(o,a,t));return Promise.all(i)},[e,t])}function uye({subject:e,open:t,bindOpen:n}){const{tableRef:r}=lr(),i=ae(e),[o,a]=Cr({bindShow:n,triggerRef:r});return h.useEffect(()=>{t&&a()},[t,a]),c.jsxs(_r,{...o,children:[c.jsx(bi,{children:c.jsx(Gs,{resource:i,link:!0})}),c.jsx(Xr,{children:c.jsx(Vs,{editable:!0,columns:!0,resource:i})})]})}const dye=e=>e.subject;function fye({resource:e}){const t=be(),n=h.useId(),{tableClass:r,sorting:i,setSortBy:o,collection:a,invalidateCollection:s}=$1e(e),{columns:u,reorderColumns:l}=g1e(r),{undoLastItem:d,addItemsToHistoryStack:f}=j1e(s),m=eye(e,a,r,s,f),[g,y]=h.useState(!1),[v,_]=h.useState(),x=h.useCallback(async I=>{const j=await a.getMemberWithIndex(I);_(j),y(!0)},[a]),S=h.useMemo(()=>({tableClassSubject:r.getSubject(),sorting:i,setSortBy:o,addItemsToHistoryStack:f}),[r,o,i,f]),C=h.useCallback(async I=>{const j=await a.getMemberWithIndex(I);if(!j)return;const P=t.getResourceLoading(j);f(b1e(P)),await P.destroy(t),s()},[a,t,s]),p=rye(a,f),w=cye(a),[b,k]=nye(e),E=h.useCallback(({index:I})=>I<a.totalMembers?c.jsx(A1e,{collection:a,index:I,columns:u}):c.jsx(T1e,{parent:e,columns:u,index:I,invalidateTable:s}),[a,u]);return c.jsx(_d,{children:c.jsxs(Fc.Provider,{value:S,children:[c.jsx(fo,{resource:e,id:n}),c.jsx(MO,{columns:u,columnSizes:b,itemCount:a.totalMembers+1,columnToKey:dye,labelledBy:n,onClearRow:C,onCellResize:k,onClearCells:p,onCopyCommand:w,onPasteCommand:m,onUndoCommand:d,onColumnReorder:l,onRowExpand:x,HeadingComponent:f1e,NewColumnButtonComponent:Z1e,children:E}),c.jsx(uye,{subject:v??Nt,open:g,bindOpen:y})]})})}function Wr({subject:e,children:t}){return c.jsxs(pye,{subject:e,about:e,children:[c.jsx(NO,{children:c.jsx("a",{href:"#skip-to-content",id:"skip-to-content",tabIndex:-1,children:"Start of main content"})}),t]})}const pye=h.memo(A.main.withConfig({displayName:"Main__StyledMain",componentId:"sc-e2a1f75f-0"})(["container:"," / inline-size;",""],Nce,e=>qa("resource-page",e.subject))),Ga=e=>`list-item-${e}`;function hye({ontology:e}){const[t]=Se(e,F.properties.classes),[n]=Se(e,F.properties.properties),[r]=Se(e,F.properties.instances);return c.jsx(mye,{children:c.jsxs(yye,{children:[c.jsx(Bl,{open:!0,title:c.jsxs(yy,{children:[c.jsx(og,{}),"Classes"]}),children:c.jsx("ul",{children:t.map(i=>c.jsx(vy,{subject:i},i))})}),c.jsx(Bl,{open:!0,title:c.jsxs(yy,{children:[c.jsx(Es,{}),"Properties"]}),children:c.jsx("ul",{children:n.map(i=>c.jsx(vy,{subject:i},i))})}),c.jsx(Bl,{open:!0,title:c.jsxs(yy,{children:[c.jsx(Dx,{}),"Instances"]}),children:c.jsx("ul",{children:r.map(i=>c.jsx(vy,{subject:i},i))})})]})})}function vy({subject:e}){const t=ae(e);return c.jsx(gye,{children:c.jsx(vye,{href:`#${Ga(e)}`,error:!!t.error,children:t.title})})}const mye=A.div.withConfig({displayName:"OntologySidebar__Wrapper",componentId:"sc-b9b3d622-0"})(["position:sticky;top:0px;display:flex;flex-direction:column;background-color:",";height:100vh;border-right:1px solid ",";min-width:10rem;"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2),yy=A.b.withConfig({displayName:"OntologySidebar__Title",componentId:"sc-b9b3d622-1"})(["display:inline-flex;align-items:center;gap:0.8ch;"]),gye=A.li.withConfig({displayName:"OntologySidebar__StyledLi",componentId:"sc-b9b3d622-2"})(["list-style:none;margin-left:0;width:100%;margin-bottom:0;"]),vye=A.a.withConfig({displayName:"OntologySidebar__ItemLink",componentId:"sc-b9b3d622-3"})(["padding-left:1rem;padding-block:0.2rem;border-radius:",";display:block;color:",";text-decoration:none;width:100%;&:hover,&:focus-visible{color:",";background-color:",";}white-space:nowrap;"],e=>e.theme.radius,e=>e.error?e.theme.colors.alert:e.theme.colors.textLight,e=>e.theme.colors.text,e=>e.theme.colors.bg1),yye=A(Hs).withConfig({displayName:"OntologySidebar__SideBarScrollArea",componentId:"sc-b9b3d622-4"})(["overflow:hidden;padding:","rem;padding-left:0.5rem;max-height:100vh;"],e=>e.theme.margin),nD=h.createContext({addClass:()=>Promise.resolve(),removeClass:()=>Promise.resolve(),addProperty:()=>Promise.resolve(),removeProperty:()=>Promise.resolve(),hasProperty:()=>!1,hasClass:()=>!1,ontology:new Fi(Nt)});function bye({ontology:e,children:t}){const[n,r]=Se(e,F.properties.classes,{commit:!0}),[i,o]=Se(e,F.properties.properties,{commit:!0}),a=h.useCallback(async g=>{await r([...n,g])},[n,r]),s=h.useCallback(async g=>{await r(n.filter(y=>y!==g))},[n,r]),u=h.useCallback(async g=>{await o([...i,g])},[i,o]),l=h.useCallback(async g=>{await o(i.filter(y=>y!==g))},[i,o]),d=h.useCallback(g=>i.includes(g),[i]),f=h.useCallback(g=>n.includes(g),[n]),m=h.useMemo(()=>({addClass:a,removeClass:s,addProperty:u,removeProperty:l,hasProperty:d,hasClass:f,ontology:e}),[a,s,u,l,d,f,e]);return c.jsx(nD.Provider,{value:m,children:t})}function pf(){return h.useContext(nD)}function rD({resource:e}){const[t]=re(e,F.properties.datatype),[n]=re(e,F.properties.classType),{hasClass:r}=pf(),i=BE[t??Nt];return n?c.jsxs("span",{children:[i,"<",r(n)?c.jsx(wye,{subject:n}):c.jsx(Ft,{subject:n}),">"]}):c.jsx("span",{children:i})}function wye({subject:e}){const t=ae(e);return c.jsx("a",{href:`#${Ga(e)}`,children:t.title})}function Ek({subject:e}){const t=ae(e),[n]=re(t,F.properties.description);return t.error?c.jsx("tr",{children:c.jsx(gt,{children:"Property does not exist anymore"})}):c.jsxs("tr",{children:[c.jsx(by,{children:t.title}),c.jsx(by,{children:c.jsx(rD,{resource:t})}),c.jsx(by,{children:c.jsx(It,{text:n??""})})]})}const by=A.td.withConfig({displayName:"PropertyLineRead__StyledTd",componentId:"sc-82d12332-0"})(["padding-inline:0.5rem;padding-block:0.4rem;vertical-align:top;"]);function xye({subject:e}){const t=ae(e),[n]=re(t,F.properties.description),[r]=Se(t,F.properties.requires),[i]=Se(t,F.properties.recommends);return c.jsx(Sye,{subject:e,children:c.jsxs(Ne,{children:[c.jsxs(Cye,{id:Ga(e),children:[c.jsx(og,{}),c.jsx(Ve,{subject:e,children:t.title})]}),c.jsx(It,{text:n??"",maxLength:1500}),c.jsx(Rk,{children:"Requires"}),c.jsx(Pk,{children:r.length>0?r.map(o=>c.jsx(Ek,{subject:o},o)):c.jsx("span",{children:"none"})}),c.jsx(Rk,{children:"Recommends"}),c.jsx(Pk,{children:i.length>0?i.map(o=>c.jsx(Ek,{subject:o},o)):c.jsx("span",{children:"none"})})]})})}const Sye=A(Gr).withConfig({displayName:"ClassCardRead__StyledCard",componentId:"sc-f73569a1-0"})(["padding-bottom:","rem;",";"],e=>e.theme.margin,e=>qa("resource-page",e.subject)),Cye=A.h3.withConfig({displayName:"ClassCardRead__StyledH3",componentId:"sc-f73569a1-1"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;font-size:1.5rem;"]),Rk=A.h4.withConfig({displayName:"ClassCardRead__StyledH4",componentId:"sc-f73569a1-2"})(["margin-bottom:0px;"]),Pk=A.table.withConfig({displayName:"ClassCardRead__StyledTable",componentId:"sc-f73569a1-3"})(["border-collapse:collapse;"]);function _ye({subject:e}){const t=ae(e),[n]=re(t,F.properties.description),[r]=Se(t,F.properties.allowsOnly);return c.jsx(Eye,{id:Ga(e),children:c.jsxs(Ne,{children:[c.jsxs(Le,{center:!0,justify:"space-between",children:[c.jsxs(kye,{children:[c.jsx(Es,{}),c.jsx(Ve,{subject:e,children:t.title})]}),c.jsx(rD,{resource:t})]}),c.jsx(It,{text:n??""}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(jye,{children:"Allows only:"}),c.jsx("div",{children:c.jsx(kT,{subjects:r})})]})]})})}const kye=A.h3.withConfig({displayName:"PropertyCardRead__Heading",componentId:"sc-dd841a97-0"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;font-size:1.5rem;"]),jye=A.h4.withConfig({displayName:"PropertyCardRead__SubHeading",componentId:"sc-dd841a97-1"})(["margin-bottom:0px;"]),Eye=A(Gr).withConfig({displayName:"PropertyCardRead__StyledCard",componentId:"sc-dd841a97-2"})(["padding-bottom:","rem;"],e=>e.theme.margin);function k4({resource:e,edit:t}){const[n]=re(e,F.properties.description),r=qr(F.properties.description),[i]=Sr(e);return!t||!i?c.jsx(It,{text:n??""}):c.jsx(mT,{commit:!0,resource:e,property:r})}const Rye=({children:e,...t})=>c.jsx(Pye,{children:c.jsx(Aye,{disabled:!!t.disabled,children:c.jsx(Iye,{...t,children:e})})}),Pye=A(ht).withConfig({displayName:"BasicSelect__StyledInputWrapper",componentId:"sc-f4f47022-0"})(["min-width:15ch;"]),Aye=A.span.withConfig({displayName:"BasicSelect__SelectWrapper",componentId:"sc-f4f47022-1"})(["width:100%;padding-inline:0.2rem;background-color:",";position:relative;&:after{content:'▾';position:absolute;right:0.5rem;top:0.5rem;pointer-events:none;color:",";}"],e=>e.disabled?e.theme.colors.bg1:e.theme.colors.bg,e=>e.theme.colors.textLight),Iye=A.select.withConfig({displayName:"BasicSelect__Select",componentId:"sc-f4f47022-2"})(["cursor:pointer;appearance:none;width:100%;border:none;outline:none;height:2rem;background-color:transparent;color:",";&:disabled{color:",";background-color:transparent;}"],e=>e.theme.colors.text,e=>e.theme.colors.textLight);function Tye({resource:e,property:t,options:n,commit:r=!1,onChange:i,...o}){const[a,s]=io(e,t,{commit:r}),u=l=>{s(l.target.value),i==null||i(l.target.value)};return c.jsx(Rye,{...o,onChange:u,value:a,children:n.map(l=>c.jsx("option",{value:l.value,children:l.label},l.value))})}const Oye=Object.entries(BE).map(([e,t])=>({value:e,label:t.toUpperCase()})).filter(e=>e.value!=="unknown-datatype");function iD({resource:e,disabled:t}){const[n,r]=Se(e,F.properties.allowsOnly,{commit:!0}),i=o=>{o===F.datatypes.resourceArray||o===F.datatypes.atomicUrl||r(void 0)};return c.jsx(Tye,{commit:!0,disabled:t,resource:e,property:F.properties.datatype,options:Oye,onChange:i})}const Dye="Change me",oD=(e,t)=>`${e.getSubject()}/class/${t}`;async function aD(e,t,n){const r=oD(t,e);return await(await n.newResource({subject:r,parent:t.getSubject(),isA:ve.classes.class,propVals:{[ve.properties.shortname]:e,[ve.properties.description]:Dye}})).save(n),t.pushPropVal(ve.properties.classes,[r]),await t.save(n),r}function Nye(e){const t=e+"CollectionProvider",[n,r]=xc(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:y,children:v}=g,_=le.useRef(null),x=le.useRef(new Map).current;return le.createElement(i,{scope:y,itemMap:x,collectionRef:_},v)},s=e+"CollectionSlot",u=le.forwardRef((g,y)=>{const{scope:v,children:_}=g,x=o(s,v),S=Vn(y,x.collectionRef);return le.createElement(wd,{ref:S},_)}),l=e+"CollectionItemSlot",d="data-radix-collection-item",f=le.forwardRef((g,y)=>{const{scope:v,children:_,...x}=g,S=le.useRef(null),C=Vn(y,S),p=o(l,v);return le.useEffect(()=>(p.itemMap.set(S,{ref:S,...x}),()=>void p.itemMap.delete(S))),le.createElement(wd,{[d]:"",ref:C},_)});function m(g){const y=o(e+"CollectionConsumer",g);return le.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const x=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((p,w)=>x.indexOf(p.ref.current)-x.indexOf(w.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},m,r]}const wy="rovingFocusGroup.onEntryFocus",Mye={bubbles:!1,cancelable:!0},j4="RovingFocusGroup",[dw,sD,$ye]=Nye(j4),[Lye,lD]=xc(j4,[$ye]),[Fye,zye]=Lye(j4),Bye=h.forwardRef((e,t)=>h.createElement(dw.Provider,{scope:e.__scopeRovingFocusGroup},h.createElement(dw.Slot,{scope:e.__scopeRovingFocusGroup},h.createElement(Hye,pe({},e,{ref:t}))))),Hye=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,...d}=e,f=h.useRef(null),m=Vn(t,f),g=g3(o),[y=null,v]=e3({prop:a,defaultProp:s,onChange:u}),[_,x]=h.useState(!1),S=Fn(l),C=sD(n),p=h.useRef(!1),[w,b]=h.useState(0);return h.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(wy,S),()=>k.removeEventListener(wy,S)},[S]),h.createElement(Fye,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:y,onItemFocus:h.useCallback(k=>v(k),[v]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>b(k=>k+1),[]),onFocusableItemRemove:h.useCallback(()=>b(k=>k-1),[])},h.createElement(wn.div,pe({tabIndex:_||w===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{p.current=!0}),onFocus:$t(e.onFocus,k=>{const E=!p.current;if(k.target===k.currentTarget&&E&&!_){const I=new CustomEvent(wy,Mye);if(k.currentTarget.dispatchEvent(I),!I.defaultPrevented){const j=C().filter(L=>L.focusable),P=j.find(L=>L.active),B=j.find(L=>L.id===y),D=[P,B,...j].filter(Boolean).map(L=>L.ref.current);cD(D)}}p.current=!1}),onBlur:$t(e.onBlur,()=>x(!1))})))}),Uye="RovingFocusGroupItem",Wye=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Gx(),u=o||s,l=zye(Uye,n),d=l.currentTabStopId===u,f=sD(n),{onFocusableItemAdd:m,onFocusableItemRemove:g}=l;return h.useEffect(()=>{if(r)return m(),()=>g()},[r,m,g]),h.createElement(dw.ItemSlot,{scope:n,id:u,focusable:r,active:i},h.createElement(wn.span,pe({tabIndex:d?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:$t(e.onMouseDown,y=>{r?l.onItemFocus(u):y.preventDefault()}),onFocus:$t(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:$t(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=Gye(y,l.orientation,l.dir);if(v!==void 0){y.preventDefault();let x=f().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const S=x.indexOf(y.currentTarget);x=l.loop?Kye(x,S+1):x.slice(S+1)}setTimeout(()=>cD(x))}})})))}),Vye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qye(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Gye(e,t,n){const r=qye(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vye[r]}function cD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Kye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Yye=Bye,Xye=Wye,uD="Tabs",[Qye,Cxe]=xc(uD,[lD]),dD=lD(),[Jye,E4]=Qye(uD),Zye=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,d=g3(s),[f,m]=e3({prop:r,onChange:i,defaultProp:o});return h.createElement(Jye,{scope:n,baseId:Gx(),value:f,onValueChange:m,orientation:a,dir:d,activationMode:u},h.createElement(wn.div,pe({dir:d,"data-orientation":a},l,{ref:t})))}),ebe="TabsList",tbe=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=E4(ebe,n),a=dD(n);return h.createElement(Yye,pe({asChild:!0},a,{orientation:o.orientation,dir:o.dir,loop:r}),h.createElement(wn.div,pe({role:"tablist","aria-orientation":o.orientation},i,{ref:t})))}),nbe="TabsTrigger",rbe=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=E4(nbe,n),s=dD(n),u=fD(a.baseId,r),l=pD(a.baseId,r),d=r===a.value;return h.createElement(Xye,pe({asChild:!0},s,{focusable:!i,active:d}),h.createElement(wn.button,pe({type:"button",role:"tab","aria-selected":d,"aria-controls":l,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u},o,{ref:t,onMouseDown:$t(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:$t(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:$t(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!i&&f&&a.onValueChange(r)})})))}),ibe="TabsContent",obe=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=E4(ibe,n),u=fD(s.baseId,r),l=pD(s.baseId,r),d=r===s.value,f=h.useRef(d);return h.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),h.createElement(Wa,{present:i||d},({present:m})=>h.createElement(wn.div,pe({"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:l,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),m&&o))});function fD(e,t){return`${e}-trigger-${t}`}function pD(e,t){return`${e}-content-${t}`}const abe=Zye,sbe=tbe,lbe=rbe,cbe=obe,ube=({children:e,tabs:t,label:n,className:r})=>c.jsxs(abe,{defaultValue:t[0].value,className:r,children:[c.jsx(dbe,{"aria-label":n,children:t.map(i=>c.jsx(fbe,{value:i.value,children:i.label},i.value))}),e]}),Ak=({value:e,children:t})=>c.jsx(cbe,{value:e,children:t}),dbe=A(sbe).withConfig({displayName:"Tabs__TabList",componentId:"sc-3914fdea-0"})(["display:flex;justify-content:space-evenly;margin-bottom:","rem;"],e=>e.theme.margin),fbe=A(lbe).withConfig({displayName:"Tabs__TabButton",componentId:"sc-3914fdea-1"})(["background:none;border:none;color:",";border-bottom:1px solid ",";padding:1rem;flex:1;"," cursor:pointer;&:hover,&:focus-visible{outline:none;background:",";}&[data-state='active']{border-bottom:2px solid ",";}"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,Wn("background","border-bottom"),e=>e.theme.colors.bg1,e=>e.theme.colors.main),uh=A.span.withConfig({displayName:"LabelText",componentId:"sc-c9b5b084-0"})(["font-weight:bold;color:",";"],e=>e.theme.colors.textLight);function pbe(e,t){const n=be(),[r,i]=Se(e,ve.properties.allowsOnly,{commit:!0}),[o,a]=Se(t,ve.properties.instances,{commit:!0}),s=h.useCallback(async l=>{const d=[...r,l.getSubject()],f=[...o??[],l.getSubject()];await i(d),await a(f),await l.save(n)},[o,r,i,a,n]),u=h.useCallback(async l=>{const d=r.filter(f=>f!==l);if(await i(d),!await hbe(l,t,n)){const f=o==null?void 0:o.filter(m=>m!==l);await a(f),await n.getResourceLoading(l).destroy(n)}},[r,i,o,a,n]);return{addTag:s,removeTag:u}}const hbe=async(e,t,n)=>{var i;if(n.getResourceLoading(e).props.parent!==t.getSubject())return!0;for(const o of t.props.properties??[])if((i=(await n.getResourceAsync(o)).props.allowsOnly)!=null&&i.includes(e))return!0;return!1};async function hD(e,t,n){const r=e.props.allowsOnly;if(r===void 0)return;const i=[];for(const o of r)(await n.getResourceAsync(o)).hasClasses(t)&&i.push(o);return i}const mbe=[{label:"Enum",value:"enum"},{label:"Custom",value:"custom"}],gbe=({resource:e,ontology:t})=>{const n=qr(F.properties.allowsOnly);return c.jsx(ube,{label:"ResourceArray Types",tabs:mbe,children:c.jsxs(c.Fragment,{children:[c.jsx(Ak,{value:"enum",children:c.jsx(vbe,{resource:e,ontology:t})}),c.jsx(Ak,{value:"custom",children:c.jsxs(Ne,{children:[c.jsx(uh,{children:"Allows Only"}),c.jsx(N3,{resource:e,property:n})]})})]})})},vbe=({resource:e,ontology:t})=>{const n=be(),[r,i]=h.useState([]),[o,a]=Se(e,ve.properties.allowsOnly,{commit:!0}),{addTag:s,removeTag:u}=pbe(e,t);return h.useEffect(()=>{hD(e,Be.classes.tag,n).then(l=>{i(l??[]),!(l===void 0||l.length===o.length)&&a(l)})},[e,o,a]),c.jsxs(Ne,{children:[c.jsx("p",{children:"Only allow its value to be one of the following tags:"}),c.jsx(Le,{wrapItems:!0,children:r.map(l=>c.jsx(JR,{subject:l,onDelete:u},l))}),c.jsx(tP,{parent:t.getSubject(),onNewTag:s})]})},Ik=new Set([F.datatypes.atomicUrl,F.datatypes.resourceArray]);function mD({resource:e,canEdit:t,onClassCreated:n}){const r=be(),[i,o]=re(e,ve.properties.classtype,{commit:!0}),[a]=re(e,ve.properties.datatype),[s,u]=Se(e,ve.properties.allowsOnly,{commit:!0}),[l]=or(),d=ae(l),f=qr(ve.properties.allowsOnly),m=h.useCallback(async x=>{const S=await aD(x,d,r);await o(S),n==null||n(),requestAnimationFrame(()=>{var C;(C=document.getElementById(Ga(S)))==null||C.scrollIntoView({behavior:"smooth"})})},[d,r,n]),g=h.useCallback(async x=>{if(x===void 0)return;const S=await hD(e,x,r);u(S)},[r,e,u]),y=h.useCallback(x=>{o(x),g(x)},[o,g]),v=!Ik.has(a??""),_=!i&&Ik.has(a??"");return c.jsxs(Ne,{children:[c.jsx(k4,{resource:e,edit:!0}),c.jsxs(Le,{children:[c.jsxs(Ne,{fullWidth:!0,as:"label",children:[c.jsx(uh,{children:"Datatype"}),c.jsx(iD,{disabled:!t,resource:e})]}),c.jsxs(Ne,{fullWidth:!0,as:"label",children:[c.jsx(uh,{children:"Classtype"}),c.jsx(D3,{disabled:!t||v,value:i,onChange:y,isA:ve.classes.class,onCreateItem:m})]})]}),_&&c.jsx(gbe,{resource:e,ontology:d}),i&&c.jsxs(Ne,{children:[c.jsx(uh,{children:"Allows Only"}),c.jsx(N3,{resource:e,property:f,isA:i})]})]})}function ybe({resource:e,close:t,...n}){const[r]=Sr(e),i=qr(F.properties.shortname);return c.jsx(_r,{...n,children:n.show&&c.jsxs(c.Fragment,{children:[c.jsx(bi,{children:c.jsx(Ic,{commit:!0,disabled:!r,resource:e,property:i})}),c.jsx(bbe,{children:c.jsx(mD,{resource:e,canEdit:r,onClassCreated:t})})]})})}const bbe=A(Xr).withConfig({displayName:"PropertyWriteDialog__WiderDialogContent",componentId:"sc-97b84967-0"})(["width:min(40rem,90vw);"]);function Tk({subject:e,onRemove:t}){const n=ae(e),r=qr(ve.properties.shortname),i=qr(ve.properties.description),[o,a,s]=Cr(),[u]=Sr(n),{hasProperty:l}=pf(),d=!u||!l(e);return n.error?c.jsx(Ok,{children:c.jsxs(Le,{center:!0,justify:"space-between",children:[c.jsxs(wbe,{children:["This property does not exist anymore (",e,")"]}),c.jsx(ue,{alert:!0,onClick:()=>t(e),children:"Remove"})]})}):c.jsxs(Ok,{children:[c.jsxs(Le,{center:!0,wrapItems:!0,children:[c.jsx(Ic,{commit:!0,required:!0,disabled:d,resource:n,property:r}),c.jsx(g2,{commit:!0,required:!0,disabled:d,resource:n,property:i}),c.jsx(iD,{disabled:d,resource:n}),c.jsx(Wt,{title:`Configure ${n.title}`,color:"textLight",onClick:a,children:c.jsx(mW,{})}),c.jsx(Wt,{title:"remove",color:"textLight",onClick:()=>t(e),children:c.jsx(lo,{})})]}),c.jsx(ybe,{resource:n,...o,close:s})]})}const Ok=A.li.withConfig({displayName:"PropertyLineWrite__ListItem",componentId:"sc-44acb48b-0"})(["margin-left:0px;list-style:none;"]),wbe=A(gt).withConfig({displayName:"PropertyLineWrite__StyledErrorLook",componentId:"sc-44acb48b-1"})(["max-lines:2;overflow:hidden;flex:1;"]),gD="calc(100% - 5.6rem + 4px)";async function xbe(e,t,n){const r=`${t.getSubject()}/property/${e}`,i=n.getResourceLoading(r,{newResource:!0});return await i.addClasses(n,F.classes.property),await i.set(F.properties.shortname,e,n),await i.set(F.properties.description,"a property",n),await i.set(F.properties.datatype,F.datatypes.string,n),await i.set(F.properties.parent,t.getSubject(),n),await i.save(n),r}function Dk({creator:e,type:t}){const n=be(),r=h.useRef(null),[i,o]=h.useState(!1),{ontology:a,addProperty:s}=pf(),u=async d=>{if(o(!1),!d)return;const f=t==="required"?F.properties.requires:F.properties.recommends;e.pushPropVal(f,[d]),await e.save(n)},l=async d=>{const f=await xbe(d,a,n);await u(f),await s(f),C2(-4,r.current)};return i?c.jsx(Sbe,{children:c.jsx(D3,{autoFocus:!0,value:"",onChange:u,isA:F.classes.property,onClose:()=>o(!1),onCreateItem:l})}):c.jsx(Cbe,{title:`add ${t} property`,onClick:()=>o(!0),ref:r,children:c.jsx(qn,{})})}const Sbe=A.div.withConfig({displayName:"AddPropertyButton__SearchBoxWrapper",componentId:"sc-9fe8e61-0"})(["width:",";"],gD),Cbe=A.button.withConfig({displayName:"AddPropertyButton__AddButton",componentId:"sc-9fe8e61-1"})(["background:none;border:1px dashed ",";height:2.5rem;width:",";border-radius:",";display:flex;align-items:center;justify-content:center;gap:1ch;cursor:pointer;color:",";"," &:hover,&:focus-visible{border-style:solid;border-color:",";color:",";}"],e=>e.theme.colors.bg2,gD,e=>e.theme.radius,e=>e.theme.colors.textLight,Wn("border-color","color"),e=>e.theme.colors.main,e=>e.theme.colors.main),_be=[sc.Delete,sc.History];function kbe({subject:e}){const t=ae(e),[n,r]=Se(t,F.properties.requires,{commit:!0}),[i,o]=Se(t,F.properties.recommends,{commit:!0}),a=qr(F.properties.shortname),{removeClass:s}=pf(),u=h.useCallback(()=>{s(e)},[s,e]),l=(d,f)=>{d==="requires"?r(n.filter(m=>m!==f)):o(i.filter(m=>m!==f))};return c.jsx(jbe,{"data-testid":`class-card-write-${t.title}`,children:c.jsxs(Ne,{id:Ga(e),children:[c.jsxs(Le,{center:!0,justify:"space-between",children:[c.jsxs(Ebe,{children:[c.jsx(og,{}),c.jsx(Ic,{commit:!0,resource:t,property:a})]}),c.jsx(Cg,{subject:e,showOnly:_be,onAfterDelete:u})]}),c.jsx(k4,{edit:!0,resource:t}),c.jsx(Nk,{children:"Requires"}),c.jsxs(Ne,{as:"ul",gap:"0.5rem",children:[n.map(d=>c.jsx(Tk,{subject:d,onRemove:f=>l("requires",f)},d)),c.jsx(Mk,{children:c.jsx(Dk,{creator:t,type:"required"})})]}),c.jsx(Nk,{children:"Recommends"}),c.jsxs(Ne,{as:"ul",gap:"0.5rem",children:[i.map(d=>c.jsx(Tk,{subject:d,onRemove:f=>l("recommends",f)},d)),c.jsx(Mk,{children:c.jsx(Dk,{creator:t,type:"recommended"})})]})]})})}const jbe=A(Gr).withConfig({displayName:"ClassCardWrite__StyledCard",componentId:"sc-b8cb01e0-0"})(["padding-bottom:","rem;max-width:100rem;border:",";input,select{height:2.5rem;}","{--error-chip-end:2.5rem;}"],e=>e.theme.margin,e=>e.theme.darkMode?`1px solid ${e.theme.colors.bg2}`:"none",Bg),Nk=A.h4.withConfig({displayName:"ClassCardWrite__StyledH4",componentId:"sc-b8cb01e0-1"})(["margin-bottom:0px;"]),Mk=A.li.withConfig({displayName:"ClassCardWrite__ButtonWrapper",componentId:"sc-b8cb01e0-2"})(["margin-left:0px;list-style:none;"]),Ebe=A.div.withConfig({displayName:"ClassCardWrite__TitleWrapper",componentId:"sc-b8cb01e0-3"})(["display:flex;align-items:center;gap:1ch;width:min(100%,50ch);svg{font-size:1.5rem;}"]);function Rbe({resource:e}){const t=be(),[n,r]=h.useState(""),[i,o]=h.useState(!1),a=h.useRef(null),s=oD(e,n),[u,l,d,f]=Cr({onSuccess:()=>{aD(n,e,t)}}),m=_=>{const x=Bs(_.target.value);r(x),g(x)},g=_=>{if(!_){o(!1);return}try{za(_,Z.SLUG),o(!0)}catch{o(!1)}},y=()=>{r(""),o(!1),l(),requestAnimationFrame(()=>{var _;(_=a.current)==null||_.focus()})},v=_=>{_.key==="Escape"&&d(!1),_.key==="Enter"&&i&&d(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs(Pbe,{onClick:y,children:[c.jsx(qn,{})," Add class"]}),c.jsx(_r,{...u,children:f&&c.jsxs(c.Fragment,{children:[c.jsx(bi,{children:c.jsx("h1",{children:"New Class"})}),c.jsx(Xr,{children:c.jsxs(Ne,{children:[c.jsx(ht,{children:c.jsx(wt,{ref:a,placeholder:"shortname",value:n,onChange:m,onKeyDown:v})}),c.jsx(Abe,{children:s},0)]})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:()=>d(!0),disabled:!i,children:"Save"})]})]})})]})}const Pbe=A.button.withConfig({displayName:"NewClassButton__DashedButton",componentId:"sc-6f5a1eb3-0"})(["width:100%;height:20rem;display:flex;align-items:center;justify-content:center;gap:1ch;appearance:none;background:none;border:2px dashed ",";border-radius:",";color:",";cursor:pointer;&:hover,&:focus-visible{background:",";border-color:",";color:",";}",""],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.colors.main,Wn("background","color","border-color")),Abe=A.div.withConfig({displayName:"NewClassButton__SubjectWrapper",componentId:"sc-6f5a1eb3-1"})(["width:100%;max-width:60ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";background-color:",";padding-inline:0.5rem;padding-block:0.2rem;border-radius:",";"],e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.radius),Ibe=[sc.Delete,sc.History];function Tbe({subject:e}){const t=ae(e),n=qr(F.properties.shortname),[r]=Sr(t),{removeProperty:i}=pf(),o=h.useCallback(()=>{i(e)},[i,e]);return c.jsx(Dbe,{id:Ga(e),children:c.jsxs(Ne,{children:[c.jsxs(Le,{center:!0,justify:"space-between",children:[c.jsxs(Obe,{children:[c.jsx(Es,{}),c.jsx(Ic,{commit:!0,resource:t,property:n})]}),c.jsx(Cg,{subject:e,showOnly:Ibe,onAfterDelete:o})]}),c.jsx(mD,{resource:t,canEdit:r})]})})}const Obe=A.div.withConfig({displayName:"PropertyCardWrite__TitleWrapper",componentId:"sc-89d3ae2b-0"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;svg{font-size:1.5rem;}"]),Dbe=A(Gr).withConfig({displayName:"PropertyCardWrite__StyledCard",componentId:"sc-89d3ae2b-1"})(["border:",";padding-bottom:","rem;"],e=>e.theme.darkMode?`1px solid ${e.theme.colors.bg2}`:"none",e=>e.theme.margin),Nbe=h.lazy(()=>Sg(()=>import("./chunk_OntologyGraph.js"),__vite__mapDeps([2,3])));function Mbe({ontology:e}){return c.jsx($be,{children:c.jsx(h.Suspense,{fallback:"loading...",children:c.jsx(Nbe,{ontology:e})})})}const $be=A.div.withConfig({displayName:"Graph__GraphWrapper",componentId:"sc-972a46a2-0"})(["position:var(--ontology-graph-position);display:grid;place-items:center;background-color:",";border:1px solid ",";aspect-ratio:var(--ontology-graph-ratio);border-radius:",";top:1rem;overflow:hidden;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.radius);function Lbe({ontology:e}){const t=be(),[n,r]=h.useState(!1),[i,o]=h.useState(),[a,s,u,l]=Cr({onSuccess:()=>{o(void 0),r(!1)}}),d=m=>{o(m),m!==void 0&&s()},f=m=>{e.pushPropVal(F.properties.instances,[m],!0),e.save(t)};return c.jsx(c.Fragment,{children:n?c.jsxs(c.Fragment,{children:[c.jsx(zbe,{children:c.jsxs(Ne,{children:[c.jsx("strong",{children:"Select the class for this instance"}),c.jsx(Ho,{autoFocus:!0,isA:F.classes.class,setSubject:d,value:i})]})}),c.jsx(_r,{...a,children:l&&i&&c.jsx(qA,{classSubject:i,closeDialog:u,onSave:f,parent:e.getSubject()})})]}):c.jsxs(Fbe,{onClick:()=>r(!0),children:[c.jsx(qn,{}),"New Instance"]})})}const Fbe=A.button.withConfig({displayName:"CreateInstanceButton__InstanceButton",componentId:"sc-5c8067aa-0"})(["display:flex;align-items:center;justify-content:center;gap:1ch;cursor:pointer;appearance:none;border:2px dashed ",";height:10rem;background-color:transparent;border-radius:",";color:",";&:hover,&:focus{border-color:",";color:",";background-color:",";}"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.bg),zbe=A.div.withConfig({displayName:"CreateInstanceButton__ChooseClassFormWrapper",componentId:"sc-5c8067aa-1"})(["min-height:10rem;border:2px dashed ",";background-color:",";border-radius:",";padding:","rem;"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin);function Bbe({resource:e}){const[t]=Se(e,F.properties.classes),[n]=Se(e,F.properties.properties),[r]=Se(e,F.properties.instances),[i]=Sr(e),[o,a]=h.useState(!1);return c.jsx(bye,{ontology:e,children:c.jsxs(Hbe,{edit:o,children:[c.jsx(Ube,{children:c.jsxs(Le,{justify:"space-between",children:[c.jsx("h1",{children:e.title}),i&&(o?c.jsxs(ue,{onClick:()=>a(!1),children:[c.jsx(vd,{}),"Read"]}):c.jsxs(ue,{onClick:()=>a(!0),children:[c.jsx(Ha,{}),"Edit"]}))]})}),c.jsx(Wbe,{children:c.jsx(hye,{ontology:e})}),c.jsx(Vbe,{children:c.jsxs(Ne,{children:[c.jsx(k4,{edit:o,resource:e}),c.jsx("h2",{children:"Classes"}),c.jsxs(xy,{children:[t.map(s=>c.jsx("li",{children:o?c.jsx(kbe,{subject:s}):c.jsx(xye,{subject:s})},s)),o&&c.jsx("li",{children:c.jsx(Rbe,{resource:e})})]}),c.jsx("h2",{children:"Properties"}),c.jsx(xy,{children:n.map(s=>c.jsx("li",{children:o?c.jsx(Tbe,{subject:s}):c.jsx(_ye,{subject:s})},s))}),c.jsx("h2",{children:"Instances"}),c.jsxs(xy,{children:[r.map(s=>c.jsx("li",{children:c.jsx(Oc,{subject:s,id:Ga(s)})},s)),o&&c.jsx(Lbe,{ontology:e})]})]})}),!o&&c.jsx(qbe,{children:c.jsx(Mbe,{ontology:e})})]})})}const Hbe=A.div.withConfig({displayName:"OntologyPage__FullPageWrapper",componentId:"sc-4df11d1a-0"})(["--ontology-graph-position:sticky;--ontology-graph-ratio:9 / 16;display:grid;grid-template-areas:",";grid-template-columns:minmax(auto,13rem) 3fr 2fr;grid-template-rows:4rem auto;width:100%;min-height:",";@container (max-width:950px){grid-template-areas:",";grid-template-columns:1fr 5fr;grid-template-rows:4rem auto auto;--ontology-graph-position:sticky;--ontology-graph-ratio:16/9;}@container (max-width:600px){grid-template-areas:",";grid-template-columns:100%;}padding-bottom:3rem;"],e=>e.edit?"'sidebar title title' 'sidebar list list'":"'sidebar title graph' 'sidebar list graph'",e=>e.theme.heights.fullPage,e=>e.edit?"'sidebar title' 'sidebar list' 'sidebar list'":"'sidebar title' 'sidebar graph' 'sidebar list'",e=>e.edit?"'title' 'list' 'list'":"'title' 'graph' 'list'"),Ube=A.div.withConfig({displayName:"OntologyPage__TitleSlot",componentId:"sc-4df11d1a-1"})(["grid-area:title;padding:","rem;"],e=>e.theme.margin),Wbe=A.div.withConfig({displayName:"OntologyPage__SidebarSlot",componentId:"sc-4df11d1a-2"})(["grid-area:sidebar;"]),Vbe=A.div.withConfig({displayName:"OntologyPage__ListSlot",componentId:"sc-4df11d1a-3"})(["grid-area:list;padding:","rem;"],e=>e.theme.margin),qbe=A.div.withConfig({displayName:"OntologyPage__GraphSlot",componentId:"sc-4df11d1a-4"})(["grid-area:graph;padding:","rem;height:100%;"],e=>e.theme.margin),xy=A.ul.withConfig({displayName:"OntologyPage__StyledUl",componentId:"sc-4df11d1a-5"})(["display:flex;flex-direction:column;gap:2rem;& > li{margin-left:0px;list-style:none;}"]);function R4({subject:e}){const t=ae(e),[n]=re(t,K.isA);if(h.useEffect(()=>{document.body.removeAttribute("inert")},[]),t.loading)return c.jsx(Wr,{subject:e,children:c.jsxs(Et,{children:[c.jsx("p",{children:"Loading..."}),c.jsx(G9,{})]})});if(t.error)return c.jsx(Wr,{subject:e,children:c.jsx(Yce,{resource:t})});const r=Gbe(n);return c.jsxs(c.Fragment,{children:[c.jsx(CO,{resource:t}),c.jsx(Wr,{subject:e,children:c.jsx(x0,{children:c.jsx(r,{resource:t})})})]})}function Gbe(e){switch(e){case F.classes.collection:return jde;case F.classes.endpoint:return Ide;case F.classes.drive:return Tde;case F.classes.redirect:return Ode;case F.classes.invite:return Dde;case F.classes.document:return Npe;case F.classes.class:return Gpe;case F.classes.file:return Kpe;case F.classes.chatRoom:return Xpe;case F.classes.message:return ohe;case F.classes.bookmark:return whe;case F.classes.importer:return SO;case F.classes.folder:return Ome;case F.classes.article:return zue;case F.classes.table:return fye;case F.classes.ontology:return Bbe;default:return wue}}function Kbe({filters:e,setFilters:t}){const[n,r]=h.useState(void 0),i=ae(n),[o]=Se(i,F.properties.requires),[a]=Se(i,F.properties.recommends),s=[...o,...a];return h.useEffect(()=>{t({...e,[F.properties.isA]:n})},[n,JSON.stringify(e)]),c.jsxs("div",{children:[c.jsx(Ho,{setSubject:r,value:n,isA:F.classes.class}),s==null?void 0:s.map(u=>c.jsx(Ybe,{subject:u,filters:e,setFilters:t},u))]})}function Ybe({filters:e,setFilters:t,subject:n}){const r=qr(n);function i(o){t({...e,[r.shortname]:o.target.value})}return c.jsxs("div",{children:[c.jsx("label",{children:r.shortname}),c.jsx("input",{type:"text",value:e[r.shortname],onChange:i})]})}function vD(){const[e]=W9(),{drive:t}=Xe(),{scope:n}=gg(),[r,i]=h.useState({}),[o,a]=h.useState(!1);Me("f12",S=>{S.preventDefault(),a(!o)},[o]);const[s,u]=h.useState(!1),[l,d]=h.useState(0),{results:f,loading:m,error:g}=qd(e,{debounce:0,parents:n||t,filters:r}),y=xt(),v=h.useRef(null);function _(S){var p;d(S);const C=(p=v==null?void 0:v.current)==null?void 0:p.children[S];C==null||C.scrollIntoView({block:"nearest"})}Me("enter",S=>{var p,w,b;S.preventDefault();const C=(w=(p=v==null?void 0:v.current)==null?void 0:p.children[l])==null?void 0:w.getAttribute("about");if(C){(b=document==null?void 0:document.activeElement)==null||b.blur();const k=mt(C);y(k)}},{enableOnTags:["INPUT"]}),Me("up",S=>{S.preventDefault();const C=l>0?l-1:0;_(C)},{enableOnTags:["INPUT"]}),Me("down",S=>{S.preventDefault();const C=l===f.length-1?f.length-1:l+1;_(C)},{enableOnTags:["INPUT"]});let x="No hits";return(e==null?void 0:e.length)===0&&(x="Enter a search query"),m&&(x="Loading results..."),f.length>0&&(x=void 0),c.jsx(Wr,{children:c.jsx(Et,{children:g?c.jsx(gt,{children:g.message}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[c.jsxs(Xbe,{children:[c.jsx(Qd,{}),c.jsx("span",{children:x||c.jsxs(c.Fragment,{children:[f.length," ",f.length>1?"Results":"Result"," for"," ",c.jsx(Qbe,{children:e})]})})]}),o&&c.jsxs(ue,{onClick:()=>u(!s),children:[c.jsx(nW,{}),"Filter"]})]}),s&&c.jsx(Kbe,{setFilters:i,filters:r}),c.jsx(Ne,{ref:v,gap:"1rem",children:f.map((S,C)=>c.jsx(Oc,{initialInView:C<5,subject:S,highlight:C===l},S))})]})})})}const Xbe=A.h1.withConfig({displayName:"SearchRoute__Heading",componentId:"sc-117087a6-0"})(["color:",";display:flex;align-items:center;gap:0.7ch;white-space:nowrap;overflow:hidden;line-height:1.5;margin-bottom:","rem;> span{overflow:hidden;text-overflow:ellipsis;}"],e=>e.theme.colors.text,e=>e.theme.margin*3),Qbe=A.span.withConfig({displayName:"SearchRoute__QueryText",componentId:"sc-117087a6-1"})(["color:",";"],e=>e.theme.colors.textLight);function Jbe({style:e}){const{darkMode:t}=Xe(),n=t?"white":"black";return c.jsxs("svg",{style:e,viewBox:"0 0 647 75",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M57.512 58.4H23.712L17.264 74H0L32.448 1.19995H49.088L81.64 74H63.96L57.512 58.4ZM52.208 45.608L40.664 17.736L29.12 45.608H52.208Z",fill:n}),c.jsx("path",{d:"M119.469 71.296C117.875 72.4746 115.899 73.376 113.541 74C111.253 74.5546 108.827 74.832 106.261 74.832C99.6052 74.832 94.4398 73.1333 90.7652 69.736C87.1598 66.3386 85.3572 61.3466 85.3572 54.76V31.776H76.7252V19.296H85.3572V5.67196H101.581V19.296H115.517V31.776H101.581V54.552C101.581 56.9093 102.171 58.7466 103.349 60.064C104.597 61.312 106.331 61.936 108.549 61.936C111.115 61.936 113.299 61.2426 115.101 59.856L119.469 71.296Z",fill:n}),c.jsx("path",{d:"M258.334 17.216C265.337 17.216 270.884 19.296 274.974 23.456C279.134 27.5466 281.214 33.7173 281.214 41.9679V74H264.99V44.464C264.99 40.0266 264.054 36.7333 262.182 34.584C260.38 32.3653 257.78 31.256 254.382 31.256C250.569 31.256 247.553 32.504 245.334 35C243.116 37.4266 242.006 41.0666 242.006 45.92V74H225.782V44.464C225.782 35.6586 222.246 31.256 215.174 31.256C211.43 31.256 208.449 32.504 206.23 35C204.012 37.4266 202.902 41.0666 202.902 45.92V74H186.678V18.048H202.174V24.496C204.254 22.1386 206.785 20.336 209.766 19.088C212.817 17.84 216.145 17.216 219.75 17.216C223.702 17.216 227.273 18.0133 230.462 19.608C233.652 21.1333 236.217 23.3866 238.158 26.368C240.446 23.456 243.324 21.2026 246.79 19.608C250.326 18.0133 254.174 17.216 258.334 17.216Z",fill:n}),c.jsx("path",{d:"M291.596 18.048H307.82V74H291.596V18.048Z",fill:n}),c.jsx("path",{d:"M345.758 74.832C339.795 74.832 334.422 73.6186 329.638 71.192C324.923 68.696 321.214 65.264 318.51 60.896C315.875 56.528 314.558 51.5706 314.558 46.0239C314.558 40.4773 315.875 35.52 318.51 31.152C321.214 26.784 324.923 23.3866 329.638 20.96C334.422 18.464 339.795 17.216 345.758 17.216C351.651 17.216 356.782 18.464 361.15 20.96C365.587 23.3866 368.811 26.888 370.822 31.464L358.238 38.224C355.326 33.0933 351.131 30.528 345.654 30.528C341.424 30.528 337.923 31.9146 335.15 34.688C332.376 37.4613 330.99 41.2399 330.99 46.0239C330.99 50.808 332.376 54.5866 335.15 57.36C337.923 60.1333 341.424 61.52 345.654 61.52C351.2 61.52 355.395 58.9546 358.238 53.824L370.822 60.688C368.811 65.1253 365.587 68.592 361.15 71.088C356.782 73.584 351.651 74.832 345.758 74.832Z",fill:n}),c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M137.633 17.5725C139.483 22.4964 144.235 26 149.806 26C155.376 26 160.128 22.4964 161.979 17.5725C172.482 22.241 179.806 32.7652 179.806 45C179.806 61.5685 166.374 75 149.806 75C133.237 75 119.806 61.5685 119.806 45C119.806 32.7652 127.13 22.241 137.633 17.5725ZM141.39 16.1965C142.679 19.589 145.961 22 149.806 22C153.65 22 156.932 19.589 158.221 16.1965C155.551 15.4176 152.727 15 149.806 15C146.884 15 144.06 15.4176 141.39 16.1965ZM163.806 45C163.806 52.732 157.538 59 149.806 59C142.074 59 135.806 52.732 135.806 45C135.806 37.268 142.074 31 149.806 31C157.538 31 163.806 37.268 163.806 45Z",fill:n}),c.jsx("path",{d:"M143.442 19.364C139.927 15.8492 139.927 10.1508 143.442 6.63604C146.956 3.12132 152.655 3.12132 156.17 6.63604C157.784 8.25001 158.656 10.3245 158.788 12.4365C158.943 14.9238 158.07 17.4632 156.17 19.364C152.655 22.8787 146.956 22.8787 143.442 19.364Z",fill:"url(#paint0_linear)"}),c.jsx("path",{d:"M415.806 1.19995H448.878C456.782 1.19995 463.75 2.72528 469.782 5.77595C475.883 8.75729 480.598 12.9866 483.926 18.464C487.323 23.9413 489.022 30.32 489.022 37.6C489.022 44.88 487.323 51.2586 483.926 56.736C480.598 62.2133 475.883 66.4773 469.782 69.528C463.75 72.5093 456.782 74 448.878 74H415.806V1.19995ZM448.046 60.168C455.326 60.168 461.115 58.1573 465.414 54.136C469.782 50.0453 471.966 44.5333 471.966 37.6C471.966 30.6666 469.782 25.1893 465.414 21.168C461.115 17.0773 455.326 15.032 448.046 15.032H432.654V60.168H448.046Z",fill:n}),c.jsx("path",{d:"M518.992 17.216C527.658 17.216 534.314 19.296 538.96 23.456C543.605 27.5466 545.928 33.752 545.928 42.072V74H530.744V67.032C527.693 72.232 522.008 74.832 513.688 74.832C509.389 74.832 505.645 74.104 502.456 72.648C499.336 71.192 496.944 69.1813 495.28 66.616C493.616 64.0506 492.784 61.1386 492.784 57.88C492.784 52.68 494.725 48.5893 498.608 45.608C502.56 42.6266 508.626 41.136 516.808 41.136H529.704C529.704 37.6 528.629 34.896 526.48 33.024C524.33 31.0826 521.106 30.112 516.808 30.112C513.826 30.112 510.88 30.5973 507.968 31.568C505.125 32.4693 502.698 33.7173 500.688 35.312L494.864 23.976C497.914 21.8266 501.554 20.1626 505.784 18.9839C510.082 17.8053 514.485 17.216 518.992 17.216ZM517.744 63.912C520.517 63.912 522.978 63.288 525.128 62.04C527.277 60.7226 528.802 58.816 529.704 56.32V50.6H518.576C511.92 50.6 508.592 52.784 508.592 57.152C508.592 59.232 509.389 60.896 510.984 62.144C512.648 63.3226 514.901 63.912 517.744 63.912Z",fill:n}),c.jsx("path",{d:"M592.539 71.296C590.944 72.4746 588.968 73.376 586.611 74C584.323 74.5546 581.896 74.832 579.331 74.832C572.675 74.832 567.51 73.1333 563.835 69.736C560.23 66.3386 558.427 61.3466 558.427 54.76V31.776H549.795V19.296H558.427V5.67196H574.651V19.296H588.587V31.776H574.651V54.552C574.651 56.9093 575.24 58.7466 576.419 60.064C577.667 61.312 579.4 61.936 581.619 61.936C584.184 61.936 586.368 61.2426 588.171 59.856L592.539 71.296Z",fill:n}),c.jsx("path",{d:"M620.054 17.216C628.721 17.216 635.377 19.296 640.022 23.456C644.668 27.5466 646.99 33.752 646.99 42.072V74H631.806V67.032C628.756 72.232 623.07 74.832 614.75 74.832C610.452 74.832 606.708 74.104 603.518 72.648C600.398 71.192 598.006 69.1813 596.342 66.616C594.678 64.0506 593.846 61.1386 593.846 57.88C593.846 52.68 595.788 48.5893 599.67 45.608C603.622 42.6266 609.689 41.136 617.87 41.136H630.766C630.766 37.6 629.692 34.896 627.542 33.024C625.393 31.0826 622.169 30.112 617.87 30.112C614.889 30.112 611.942 30.5973 609.03 31.568C606.188 32.4693 603.761 33.7173 601.75 35.312L595.926 23.976C598.977 21.8266 602.617 20.1626 606.846 18.9839C611.145 17.8053 615.548 17.216 620.054 17.216ZM618.806 63.912C621.58 63.912 624.041 63.288 626.19 62.04C628.34 60.7226 629.865 58.816 630.766 56.32V50.6H619.638C612.982 50.6 609.654 52.784 609.654 57.152C609.654 59.232 610.452 60.896 612.046 62.144C613.71 63.3226 615.964 63.912 618.806 63.912Z",fill:n}),c.jsx("defs",{children:c.jsxs("linearGradient",{id:"paint0_linear",x1:"156.17",y1:"19.364",x2:"143.442",y2:"6.63604",gradientUnits:"userSpaceOnUse",children:[c.jsx("stop",{stopColor:"#033049"}),c.jsx("stop",{offset:"1",stopColor:"#00C2FF"})]})})]})}const yD=()=>c.jsxs(Et,{children:[c.jsx(Jbe,{style:{width:"30rem",maxWidth:"100%",marginBottom:"1rem"}}),c.jsx("p",{children:c.jsxs("em",{children:["The easiest way to ",c.jsx("b",{children:"create"}),", ",c.jsx("b",{children:"share"})," and ",c.jsx("b",{children:"model"})," linked data."]})}),c.jsx("p",{children:"Atomic Data is a modular specification for sharing, modifying and modeling graph data. It combines the ease of use of JSON, the connectivity of RDF (linked data) and the reliability of type-safety."}),c.jsxs("p",{children:["Atomic Data is especially suitable for knowledge graphs, distributed datasets, semantic data, p2p applications, decentralized apps, and data that is meant to be shared. It is designed to be highly extensible, easy to use, and to make the process of domain specific standardization as simple as possible. Check out"," ",c.jsx("b",{children:c.jsx(Ve,{href:"https://docs.atomicdata.dev/",children:"the docs"})})," ","for more information about Atomic Data."]}),c.jsx("h2",{children:"About this app"}),c.jsxs("p",{children:["You're looking at"," ",c.jsx(Ve,{href:"https://github.com/atomicdata-dev/atomic-data-browser",children:"atomic-data-browser"}),", an open-source client for viewing and editing data. Please add an issue if you encouter problems or have a feature request. Expect bugs and issues, because this stuff is pretty beta."]}),c.jsxs("p",{children:["The back-end of this app is"," ",c.jsx(Ve,{href:"https://github.com/atomicdata-dev/atomic-data-rust",children:"atomic-server"}),", which you can think of as an open source, web-native database."]}),c.jsx("h2",{children:"Things to visit"}),c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx(Ve,{path:"/collections",children:"List of lists"})}),c.jsx("li",{children:c.jsx(Ve,{path:"/classes",children:"List of Classes"})}),c.jsx("li",{children:c.jsx(Ve,{path:"/properties",children:"List of Properties"})})]}),c.jsx("h2",{children:"Run your own server"}),c.jsxs("p",{children:["The easiest way to run an"," ",c.jsx(Ve,{href:"https://github.com/atomicdata-dev/atomic-data-rust",children:"atomic-server"})," ","is by using Docker:"]}),c.jsx("p",{children:c.jsx("code",{children:"docker run -p 80:80 -p 443:443 -v atomic-storage:/atomic-storage joepmeneer/atomic-server"})}),c.jsxs("p",{children:["...and visit"," ",c.jsx(Ve,{subject:"http://localhost",children:"localhost"}),"."]}),c.jsx("h2",{children:"Join the community"}),c.jsxs("p",{children:["Atomic Data is open and fully powered by volunteers. We're looking for people who want to help discuss various design challenges and work on implmenentations. If you have any questions, or want to help out, feel free to join our"," ",c.jsx(Ve,{href:"https://discord.gg/a72Rv2P",children:"Discord"}),"! Sign up to"," ",c.jsx(Ve,{href:"https://docs.atomicdata.dev/newsletter.html",children:"our newsletter"})," ","if you","'","d like to get updated! ."]})]}),Zbe=()=>{const[e]=or();return e===void 0||e===""?c.jsx(yD,{}):bn.isValidSubject(e)?c.jsx(R4,{subject:e},e):c.jsx(vD,{})},e2e=({classSubject:e})=>{const t=ae(e),[n,r]=Rs("newSubject"),[i]=Rs("parent"),{initialized:o,subjectErr:a,subjectValue:s,setSubjectValue:u,resource:l}=VA({klass:t,setSubject:r,initialSubject:n,parent:i});return o?c.jsxs(Ne,{children:[c.jsx(UA,{classSubject:e}),c.jsx(WA,{error:a,value:s,onChange:u}),c.jsx(Wg,{resource:l,classSubject:e},`${e}+${n}`)]}):c.jsx(c.Fragment,{children:"Initializing Resource"})};function bD({title:e,children:t}){return c.jsxs(c.Fragment,{children:[c.jsx(t2e,{children:e}),c.jsx(Le,{wrapItems:!0,children:t})]})}const t2e=A.h2.withConfig({displayName:"ButtonSection__Heading",componentId:"sc-5790a352-0"})(["display:flex;align-items:center;font-size:1rem;gap:1ch;width:100%;color:",";font-weight:normal;margin:0;font-family:",";"],({theme:e})=>e.colors.textLight,({theme:e})=>e.fontFamily);function wD({classType:e,parent:t}){const n=ae(e),[r]=nt(n);return c.jsx(kd,{icon:!0,IconComponent:Fo(e),klass:e,parent:t,label:r,subtle:!0})}const n2e=[Be.classes.table,Be.classes.folder,Be.classes.document,Be.classes.chatroom,Be.classes.bookmark,ve.classes.ontology];function r2e({parent:e}){return c.jsx(bD,{title:"Base classes",children:n2e.map(t=>c.jsx(wD,{classType:t,parent:e},t))})}function i2e({parent:e}){const{drive:t}=Xe(),{results:n}=qd("",{filters:{[ve.properties.isA]:ve.classes.ontology},parents:[t],allowEmptyQuery:!0,limit:100});return c.jsx(c.Fragment,{children:n.map(r=>c.jsx(o2e,{subject:r,parent:e},r))})}const o2e=({subject:e,parent:t})=>{const n=ae(e),r=n.props.classes??[];return r.length===0?null:c.jsx(bD,{title:n.title,children:r.map(i=>c.jsx(wD,{classType:i,parent:t},i))})};function a2e(){const[e]=Rs("classSubject");return c.jsx(Et,{children:e?c.jsx(e2e,{classSubject:e.toString()}):c.jsx(s2e,{})})}function s2e(){const[e]=Rs("parentSubject"),{drive:t}=Xe(),n=e||t,r=ae(n),i=xt(),o=m3();function a(u){u&&o(u,n)}const s=h.useCallback(u=>{lt.success(`Uploaded ${u.length} files.`),n&&i(mt(n))},[e,i]);return c.jsx(Wr,{children:c.jsxs(l2e,{children:[c.jsxs("h1",{children:["Create new resource"," ",n&&c.jsxs(c.Fragment,{children:["under ",c.jsx(Ft,{subject:n})]})]}),c.jsx("div",{children:c.jsx(Ho,{hideCreateOption:!0,setSubject:a,isA:F.classes.class})}),c.jsx(r2e,{parent:n}),c.jsx(i2e,{parent:n}),c.jsx(S0,{parentResource:r,onFilesUploaded:s})]})})}const l2e=A.div.withConfig({displayName:"NewRoute__StyledForm",componentId:"sc-200c8fe8-0"})(["display:flex;flex-direction:column;gap:","rem;"],({theme:e})=>e.margin*2);function D0(){return(D0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function xD(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function fw(e){var t=h.useRef(e),n=h.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var $d=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Uu=function(e){return"touches"in e},pw=function(e){return e&&e.ownerDocument.defaultView||self},$k=function(e,t,n){var r=e.getBoundingClientRect(),i=Uu(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:$d((i.pageX-(r.left+pw(e).pageXOffset))/r.width),top:$d((i.pageY-(r.top+pw(e).pageYOffset))/r.height)}},Lk=function(e){!Uu(e)&&e.preventDefault()},SD=le.memo(function(e){var t=e.onMove,n=e.onKey,r=xD(e,["onMove","onKey"]),i=h.useRef(null),o=fw(t),a=fw(n),s=h.useRef(null),u=h.useRef(!1),l=h.useMemo(function(){var g=function(_){Lk(_),(Uu(_)?_.touches.length>0:_.buttons>0)&&i.current?o($k(i.current,_,s.current)):v(!1)},y=function(){return v(!1)};function v(_){var x=u.current,S=pw(i.current),C=_?S.addEventListener:S.removeEventListener;C(x?"touchmove":"mousemove",g),C(x?"touchend":"mouseup",y)}return[function(_){var x=_.nativeEvent,S=i.current;if(S&&(Lk(x),!function(p,w){return w&&!Uu(p)}(x,u.current)&&S)){if(Uu(x)){u.current=!0;var C=x.changedTouches||[];C.length&&(s.current=C[0].identifier)}S.focus(),o($k(S,x,s.current)),v(!0)}},function(_){var x=_.which||_.keyCode;x<37||x>40||(_.preventDefault(),a({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},v]},[a,o]),d=l[0],f=l[1],m=l[2];return h.useEffect(function(){return m},[m]),le.createElement("div",D0({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:i,onKeyDown:f,tabIndex:0,role:"slider"}))}),P4=function(e){return e.filter(Boolean).join(" ")},CD=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=P4(["react-colorful__pointer",e.className]);return le.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},le.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},An=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},c2e=function(e){return h2e(hw(e))},hw=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?An(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?An(parseInt(e.substring(6,8),16)/255,2):1}},u2e=function(e){return p2e(f2e(e))},d2e=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:An(e.h),s:An(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:An(i/2),a:An(r,2)}},mw=function(e){var t=d2e(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},f2e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),u=r*(1-(1-t+o)*n),l=o%6;return{r:An(255*[r,s,a,a,u,r][l]),g:An(255*[u,r,r,s,a,a][l]),b:An(255*[a,a,u,r,r,s][l]),a:An(i,2)}},kp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},p2e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?kp(An(255*i)):"";return"#"+kp(t)+kp(n)+kp(r)+o},h2e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:An(60*(s<0?s+6:s)),s:An(o?a/o*100:0),v:An(o/255*100),a:i}},m2e=le.memo(function(e){var t=e.hue,n=e.onChange,r=P4(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(SD,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:$d(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":An(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(CD,{className:"react-colorful__hue-pointer",left:t/360,color:mw({h:t,s:100,v:100,a:1})})))}),g2e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:mw({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(SD,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:$d(t.s+100*i.left,0,100),v:$d(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+An(t.s)+"%, Brightness "+An(t.v)+"%"},le.createElement(CD,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:mw(t)})))}),_D=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},v2e=function(e,t){return e.toLowerCase()===t.toLowerCase()||_D(hw(e),hw(t))};function y2e(e,t,n){var r=fw(n),i=h.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=h.useRef({color:t,hsva:o});h.useEffect(function(){if(!e.equal(t,s.current.color)){var l=e.toHsva(t);s.current={hsva:l,color:t},a(l)}},[t,e]),h.useEffect(function(){var l;_D(o,s.current.hsva)||e.equal(l=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:l},r(l))},[o,e,r]);var u=h.useCallback(function(l){a(function(d){return Object.assign({},d,l)})},[]);return[o,u]}var b2e=typeof window<"u"?h.useLayoutEffect:h.useEffect,w2e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Fk=new Map,x2e=function(e){b2e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Fk.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Fk.set(t,n);var r=w2e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},S2e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=xD(e,["className","colorModel","color","onChange"]),s=h.useRef(null);x2e(s);var u=y2e(n,i,o),l=u[0],d=u[1],f=P4(["react-colorful",t]);return le.createElement("div",D0({},a,{ref:s,className:f}),le.createElement(g2e,{hsva:l,onChange:d}),le.createElement(m2e,{hue:l.h,onChange:d,className:"react-colorful__last-control"}))},C2e={defaultColor:"000",toHsva:c2e,fromHsva:function(e){return u2e({h:e.h,s:e.s,v:e.v,a:1})},equal:v2e},_2e=function(e){return le.createElement(S2e,D0({},e,{colorModel:C2e}))};function Sy({top:e,floating:t,title:n}){const{navbarTop:r,setNavbarTop:i,navbarFloating:o,setNavbarFloating:a}=Xe();return c.jsx(k2e,{title:n,current:r===e&&o===t,onClick:()=>{i(e),a(t)},children:c.jsx("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t?c.jsx("rect",{x:"10",y:"60",width:"60",height:"10",rx:"5"}):c.jsx("rect",{x:"0",y:e?"0":"70",width:"80",height:"10"})})})}const k2e=A.button.withConfig({displayName:"NavStyleButton__NavStyleButtonStyling",componentId:"sc-e96a4534-0"})(["rect{fill:",";}&:hover{border-color:",";}&:active{border-color:",";}background-color:",";cursor:pointer;border:solid 1px ",";border-radius:",";padding:0;overflow:hidden;line-height:0;"],e=>e.current?e.theme.colors.main:e.theme.colors.bg2,e=>e.theme.colors.mainLight,e=>e.theme.colors.mainDark,e=>e.theme.colors.bg,e=>e.current?e.theme.colors.mainLight:e.theme.colors.bg2,e=>e.theme.radius),j2e=()=>{const{darkModeSetting:e,setDarkMode:t,viewTransitionsEnabled:n,setViewTransitionsEnabled:r}=Xe(),{enabledPanels:i,enablePanel:o,disablePanel:a}=SP(),s=u=>l=>{l?o(u):a(u)};return c.jsx(Wr,{children:c.jsxs(Et,{children:[c.jsx("h1",{children:"Settings"}),c.jsxs(Ne,{children:[c.jsx(uu,{children:"Theme"}),c.jsxs(Le,{children:[c.jsx(ue,{subtle:e!==Fl.auto,onClick:()=>t(void 0),title:"Use the browser's / OS dark mode settings",children:"🌓 Auto"}),c.jsx(ue,{subtle:e!==Fl.always,onClick:()=>t(!0),children:"🌑 Dark"}),c.jsx(ue,{subtle:e!==Fl.never,onClick:()=>t(!1),children:"🌕 Light"})]}),c.jsx(uu,{children:"Navigation bar position"}),c.jsxs(Le,{children:[c.jsx(Sy,{floating:!0,top:!1,title:"Floating"}),c.jsx(Sy,{floating:!1,top:!1,title:"Bottom"}),c.jsx(Sy,{floating:!1,top:!0,title:"Top"})]}),c.jsx(uu,{children:"Main color"}),c.jsx(E2e,{}),c.jsx(uu,{children:"Panels"}),c.jsxs(X2,{children:[c.jsx(cc,{checked:i.has(Cd.Ontologies),onChange:s(Cd.Ontologies)})," ","Enable Ontology panel"]}),c.jsx(uu,{children:"Animations"}),c.jsxs(X2,{children:[c.jsx(cc,{checked:n,onChange:u=>r(u)})," ","Enable view transitions"]})]})]})})},E2e=()=>{const{mainColor:e,setMainColor:t}=Xe();return c.jsx(_2e,{color:e,onChange:n=>t(n)})},uu=A.h2.withConfig({displayName:"SettingsTheme__Heading",componentId:"sc-e9a5ef2-0"})(["font-size:1em;margin:0;margin-top:1rem;"]);function R2e(){const[e]=or(),t=ae(e),[n,r]=h.useState(void 0),i=xt();function o(s){if(s.preventDefault(),!n)throw new Error("No subject input");i(V9(n))}const a=()=>{i(mt(e??""))};return c.jsxs(c.Fragment,{children:[c.jsx(CO,{resource:t}),c.jsx(Et,{children:c.jsx(Wr,{subject:e,children:e?c.jsxs(Ne,{children:[c.jsxs(Le,{center:!0,gap:"1ch",children:[c.jsx(Wt,{title:`Back to ${t.title}`,size:"1.4em",onClick:a,children:c.jsx(ig,{})}),c.jsx(Gs,{resource:t,prefix:"Edit"})]}),c.jsx(c4,{resource:t}),c.jsx(Wg,{resource:t},e)]}):c.jsxs("form",{onSubmit:o,children:[c.jsx("h1",{children:"edit a resource"}),c.jsx(wt,{value:n||void 0,onChange:s=>r(s.target.value),placeholder:"Enter a Resource URL..."})]})})})]})}function P2e(){const[e]=or(),t=ae(e),[n,r]=h.useState(void 0),[i,o]=h.useState(!1),[a,s]=h.useState(void 0),{agent:u}=Xe(),l=be(),d=xt();if(t.loading)return c.jsxs(Et,{children:["Loading ",e,"..."]});if(t.error)return c.jsx(Et,{children:c.jsx(gt,{children:t.error.message})});async function f(g){let y={};y.Accept=g,u&&(y=await kb(e,u,y)),o(!0);try{const _=await(await window.fetch(e,{headers:y})).text();o(!1),r(_),s(void 0)}catch(v){o(!1),s(v)}}const m=()=>{d(mt(e??""))};return c.jsx(Et,{about:e,children:c.jsx(Wr,{children:c.jsxs(Ne,{children:[c.jsxs(Le,{center:!0,gap:"1ch",children:[c.jsx(Wt,{size:"1.4em",title:`Back to ${t.title}`,onClick:m,children:c.jsx(ig,{})}),c.jsx(Gs,{resource:t,prefix:"Data for",link:!0})]}),c.jsxs(ah,{columns:!0,children:[c.jsx(sh,{title:"The URL of the resource",children:"subject:"}),c.jsx(Ve,{subject:e,children:e})]}),c.jsx(Vs,{resource:t,editable:!0,columns:!0}),t.hasUnsavedChanges()?c.jsxs(c.Fragment,{children:[c.jsx("h2",{children:"⚠️ contains uncommitted changes"}),c.jsx("p",{children:"This means that (some) of your local changes are not yet saved."}),t.commitError&&c.jsx(gn,{children:t.commitError.message}),c.jsx(ue,{onClick:()=>t.save(l),children:"save"})]}):null,c.jsx("h2",{children:"Code"}),c.jsxs(Le,{wrapItems:!0,children:[c.jsx(ue,{subtle:!0,onClick:()=>f("application/ad+json"),"data-test":"fetch-json-ad",children:"JSON-AD"}),c.jsx(ue,{subtle:!0,onClick:()=>f("application/json"),"data-test":"fetch-json",children:"JSON"}),c.jsx(ue,{subtle:!0,onClick:()=>f("application/ld+json"),"data-test":"fetch-json-ld",children:"JSON-LD"}),c.jsx(ue,{subtle:!0,onClick:()=>f("text/turtle"),"data-test":"fetch-turtle",children:"Turtle / N-triples / N3"})]}),a&&c.jsx(gn,{children:a.message}),!a&&n&&c.jsx(I0,{content:n,loading:i}),c.jsx("h2",{children:"Usage"}),c.jsx(f3,{resource:t})]})})})}const A2e=()=>c.jsx(Wr,{children:c.jsxs(Et,{children:[c.jsx("h1",{children:"Keyboard shortcuts"}),c.jsx("h3",{children:"Global"}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.search})," Search"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.sidebarToggle})," Show or hide the sidebar"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:"?"})," Show these keyboard shortcuts"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.edit})," ",c.jsx("b",{children:"E"}),"dit resource"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.data})," Show ",c.jsx("b",{children:"d"}),"ata for resource"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.home})," Show ",c.jsx("b",{children:"h"}),"ome page"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.new})," ",c.jsx("b",{children:"N"}),"ew resource"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.menu})," Open ",c.jsx("b",{children:"m"}),"enu"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.userSettings})," ",c.jsx("b",{children:"U"}),"ser settings"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.themeSettings})," ",c.jsx("b",{children:"T"}),"heme settings"]}),c.jsx("h3",{children:"Document"}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.moveLineUp})," Move line / section up"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.moveLineDown})," Move line / section down"]}),c.jsxs("p",{children:[c.jsx(Ar,{shortcut:ot.deleteLine})," Delete line"]})]})}),Ar=A(lR).withConfig({displayName:"ShortcutsRoute__Key",componentId:"sc-16a772e1-0"})(["font-size:1rem;"]);function I2e(){const{pathname:e,search:t}=Ms(),n=window.location.origin+e+t;return c.jsx(R4,{subject:n},n)}const T2e=()=>{var b;const{agent:e,setAgent:t}=Xe(),[n,r]=h.useState(void 0),[i,o]=h.useState(void 0),[a,s]=h.useState(void 0),[u,l]=h.useState(!1),[d,f]=h.useState(!1),[m,g]=h.useState(void 0),y=xt();h.useEffect(()=>{e!==void 0?_():g("")},[e]),h.useEffect(()=>{v()},[n,i]);function v(){e&&g(e.buildSecret())}function _(){try{if(!e)throw new Error("No agent set");r(e.subject),o(e.privateKey)}catch(k){const E=new Error("Cannot fill subject and privatekey fields."+k);s(E),r("")}}function x(){window.confirm("If you sign out, your secret will be removed. If you haven't saved your secret somewhere, you will lose access to this User. Are you sure you want to sign out?")&&(t(void 0),s(void 0),r(""),o(""))}function S(k,E){JSON.stringify(k)!==JSON.stringify(E)&&t(E)}async function C(){v(),s(void 0);try{const k=new Lh(i,n);await k.getPublicKey(),await k.verifyPublicKeyWithServer(),S(e,k)}catch(k){const E=new Error("Invalid Agent"+k);s(E)}}function p(){m&&navigator.clipboard.writeText(m)}async function w(k){if(g(k),k===""){g(""),s(void 0);return}s(void 0);try{const E=Lh.fromSecret(k);S(e,E),o(E.privateKey),r(E.subject)}catch(E){const I=new Error("Invalid secret. "+E);s(I)}}return c.jsx(Wr,{children:c.jsx(Et,{children:c.jsxs("form",{children:[c.jsx("h1",{children:"User Settings"}),c.jsx("p",{children:"An Agent is a user, consisting of a Subject (its URL) and Private Key. Together, these can be used to edit data and sign Commits."}),e?c.jsxs(c.Fragment,{children:[((b=e.subject)==null?void 0:b.startsWith("http://localhost"))&&c.jsxs("p",{children:[c.jsx(gt,{children:"Warning:"}),"You're using a local Agent, which cannot authenticate on other domains, because its URL does not resolve."]}),c.jsxs(eP,{children:[c.jsx(U9,{})," You","'","re signed in as"]}),c.jsx("p",{children:c.jsx(Ft,{subject:e.subject})}),c.jsx(ue,{onClick:()=>y(cg(e.subject)),children:"Edit profile"}),c.jsx(zce,{})]}):c.jsxs("p",{children:["You can create your own Agent by hosting an"," ",c.jsx(Ve,{href:"https://github.com/atomicdata-dev/atomic-data-rust/tree/master/server",children:"atomic-server"}),". Alternatively, you can use"," ",c.jsx(Ve,{subject:"https://atomicdata.dev/invites",children:"an Invite"})," ","to get a guest Agent on someone else","'s"," Atomic Server."]}),c.jsx(Hn,{label:e?"Agent Secret":"Enter your Agent Secret",helper:"The Agent Secret is a long string of characters that encodes both the Subject and the Private Key. You can think of it as a combined username + password. Store it safely, and don't share it with others.",error:a,children:c.jsxs(ht,{children:[c.jsx(wt,{value:m,onChange:k=>w(k.target.value),type:u?"text":"password",disabled:e!==void 0,name:"secret",id:"current-password",autoComplete:"current-password",spellCheck:"false"}),c.jsx(us,{type:"button",title:u?"Hide secret":"Show secret",onClick:()=>l(!u),children:u?c.jsx(nS,{}):c.jsx(vd,{})}),c.jsx(us,{type:"button",title:d?"Hide advanced":"Show advanced",onClick:()=>f(!d),children:c.jsx($x,{})}),e&&c.jsx(us,{type:"button",onClick:p,children:"copy"})]})}),d?c.jsxs(c.Fragment,{children:[c.jsx(Hn,{label:"Subject URL",helper:"The link to your Agent, e.g. https://atomicdata.dev/agents/someAgent",children:c.jsx(ht,{children:c.jsx(wt,{disabled:e!==void 0,value:n,onChange:k=>{r(k.target.value),C()}})})}),c.jsx(Hn,{label:"Private Key",helper:"The private key of the Agent, which is a Base64 encoded string.",children:c.jsxs(ht,{children:[c.jsx(wt,{disabled:e!==void 0,type:u?"text":"password",value:i,onChange:k=>{o(k.target.value),C()}}),c.jsx(us,{type:"button",title:u?"Hide private key":"Show private key",onClick:()=>l(!u),children:u?c.jsx(nS,{}):c.jsx(vd,{})})]})})]}):null,e&&c.jsx(ue,{subtle:!0,title:"Sign out with current Agent and reset this form",onClick:x,"data-test":"sign-out",children:"sign out"})]})})})};var fa;(function(e){e[e.CONNECTING=WebSocket.CONNECTING]="CONNECTING",e[e.OPEN=WebSocket.OPEN]="OPEN",e[e.CLOSING=WebSocket.CLOSING]="CLOSING",e[e.CLOSED=WebSocket.CLOSED]="CLOSED"})(fa||(fa={}));function O2e(e){switch(e){case fa.OPEN:return[c.jsx(Vv,{color:"#3AA55D",title:"Websocket Connected"},"connected"),"green"];case fa.CLOSING:return[c.jsx(Vv,{color:"orange",title:"Websocket Closing"},"closing"),"#FAA81A"];case fa.CLOSED:return[c.jsx(zx,{color:"red",title:"Websocket Closed"},"closed"),"#ED4245"];case fa.CONNECTING:default:return[c.jsx(Vv,{color:"gray",title:"Websocket Connecting..."},"connecting"),"gray"]}}function D2e({subject:e,className:t}){var u;const n=be(),{drive:r}=Xe(),[i,o]=h.useState(((u=n.getWebSocketForSubject(e))==null?void 0:u.readyState)??fa.CONNECTING);h.useEffect(()=>{const l=n.getWebSocketForSubject(e);if(!l)return o(fa.CONNECTING);o(l==null?void 0:l.readyState);const d=setInterval(()=>{l.readyState!==i&&o(l.readyState)},1e3);return()=>{clearInterval(d)}},[r,n]);const[a,s]=O2e(i);return c.jsx(N2e,{color:s,className:t,children:a})}const N2e=A.div.withConfig({displayName:"WSIndicator__IconWrapper",componentId:"sc-93ef4c8e-0"})(["display:contents;color:",";font-size:1rem;"],e=>e.color);function M2e({subject:e,className:t}){const[n,r,i]=_g(),[o,a,s]=p3(),u=n.includes(e),l=u?bW:SW,d=h.useCallback(()=>{u?(i(e),a(e)):(r(e),s(e))},[e,n,s,a,r,i]);return c.jsx($2e,{className:t,onClick:d,title:u?"Remove from favorites":"Add to favorites",children:c.jsx(l,{})})}const $2e=A.button.withConfig({displayName:"FavoriteButton__StyledButton",componentId:"sc-6477e6eb-0"})(["background:none;border:none;cursor:pointer;color:",";width:1.3rem;display:flex;align-items:center;padding:0;"],e=>e.theme.colors.main);function L2e({subject:e,onClick:t,disabled:n}){return c.jsxs(F2e,{children:[c.jsx(W2e,{children:c.jsx(Ft,{subject:e})}),c.jsx(B2e,{children:e}),c.jsx(H2e,{onClick:()=>t(e),disabled:n,children:"Select"}),c.jsx(z2e,{subject:e}),c.jsx(U2e,{subject:e})]})}const F2e=A.div.withConfig({displayName:"DriveRow__DriveRowWrapper",componentId:"sc-e89cf3b2-0"})(["--title-font-weight:500;display:grid;grid-template-areas:'title ws subject button icon';grid-template-columns:20ch 1.3rem auto 10ch 1.3rem;gap:","rem;align-items:center;padding-block:0.3rem;@container (max-width:500px){grid-template-areas:'ws title icon' 'subject subject subject' 'button button button';grid-template-columns:1.3rem auto 1rem;padding-block:1rem;--title-font-weight:bold;}"],e=>e.theme.margin),z2e=A(M2e).withConfig({displayName:"DriveRow__StyledFavoriteButton",componentId:"sc-e89cf3b2-1"})(["grid-area:icon;"]),B2e=A.span.withConfig({displayName:"DriveRow__Subject",componentId:"sc-e89cf3b2-2"})(["grid-area:subject;color:",";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"],e=>e.theme.colors.textLight),H2e=A(ue).withConfig({displayName:"DriveRow__SelectButton",componentId:"sc-e89cf3b2-3"})(["grid-area:button;background-color:",";color:",";align-self:flex-end;"],e=>e.disabled?e.theme.colors.main:"transparent",e=>e.disabled?"white":e.theme.colors.main),U2e=A(D2e).withConfig({displayName:"DriveRow__StyledWSIndicator",componentId:"sc-e89cf3b2-4"})(["grid-area:ws;"]),W2e=A.div.withConfig({displayName:"DriveRow__TitleWrapper",componentId:"sc-e89cf3b2-5"})(["grid-area:title;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--title-font-weight);"]);function zk({drives:e,onDriveSelect:t,showNewOption:n}){const{drive:r}=Xe();return e.length===0?c.jsx("span",{children:"Nothing to show"}):c.jsx(V2e,{children:c.jsxs(Pd,{children:[e.map((i,o)=>c.jsx(Os,{noBorder:o===0,children:c.jsx(L2e,{subject:i,onClick:t,disabled:i===r})},i)),n&&c.jsx(Os,{children:c.jsx(q2e,{klass:F.classes.drive,subtle:!0,icon:!0,label:"New Drive"})})]})})}const V2e=A(Gr).withConfig({displayName:"DrivesCard__ContainerCard",componentId:"sc-97ea4d25-0"})(["container-type:inline-size;padding-top:0;"]),q2e=A(kd).withConfig({displayName:"DrivesCard__StyledNewInstanceButton",componentId:"sc-97ea4d25-1"})(["border:none;box-shadow:none;padding:0;&&:hover,&&:focus{box-shadow:none;}"]);function G2e(){const{drive:e,setDrive:t}=Xe(),n=xt(),[r,i]=h.useState(e),[o,a]=h.useState(),[s]=_g(),[u,l]=p3(s);function d(f){try{t(f),i(f),l(f),n(mt(f))}catch(m){a(m)}}return c.jsx(Wr,{children:c.jsx(Is,{children:c.jsxs(Ne,{children:[c.jsx(Cy,{children:"Drive Configuration"}),c.jsx(eP,{children:"Current Drive"}),c.jsxs(Le,{children:[c.jsx(ht,{children:c.jsx(wt,{"data-test":"server-url-input",value:r,onChange:f=>i(f.target.value)})}),c.jsx(ue,{onClick:()=>d(r),disabled:e===r,"data-test":"server-url-save",children:"Save"})]}),o&&c.jsx(gt,{children:o==null?void 0:o.message}),c.jsx(Cy,{as:"h2",children:"Saved"}),c.jsx(zk,{showNewOption:!0,drives:s,onDriveSelect:f=>d(f)}),c.jsx(Cy,{as:"h2",children:"Other"}),c.jsx(zk,{drives:u,onDriveSelect:f=>d(f)})]})})})}const Cy=A.h1.withConfig({displayName:"SettingsServer__Heading",componentId:"sc-e808da3c-0"})(["margin:0;"]);function K2e({target:e}){const t=be(),[n]=h.useState(()=>t.createSubject("invite")),r=ae(n,{newResource:!0}),[i,o]=h.useState(void 0),[a]=Cx(),[s,u]=h.useState(!1),l=h.useCallback(async()=>{await r.set(K.isA,[F.classes.invite],t),await r.set(K.read,[F.instances.publicAgent],t),await r.set(K.invite.target,e.getSubject(),t);try{if(!a)throw new Error("No agent found");await r.set(K.parent,a.subject,t),await r.save(t),await navigator.clipboard.writeText(r.getSubject()),lt.success("Copied to clipboard"),u(!0)}catch(d){o(d)}},[r,t,a,e]);return s?c.jsxs(Gr,{children:[c.jsx("p",{children:"Invite created and copied to clipboard! Send it to your buddy:"}),c.jsx(I0,{content:r.getSubject(),"data-test":"invite-code"})]}):c.jsxs(Gr,{children:[c.jsx(Mr,{label:"Give edit rights",propertyURL:F.properties.invite.write,resource:r}),c.jsx(Mr,{label:"Invite text (optional)",propertyURL:F.properties.description,resource:r}),c.jsx(Mr,{label:"How many times this link can be used. No value = no limit.",propertyURL:F.properties.invite.usagesLeft,resource:r}),c.jsx(ue,{onClick:l,children:"Create Invite"}),i&&c.jsx("p",{children:c.jsx(gt,{children:i.message})})]})}function Y2e(){const[e]=or(),t=ae(e),n=be(),[r]=Sr(t),[i,o]=h.useState(!1),[a,s]=h.useState(void 0),u=xt(),l={commit:!1,handleValidationError:s},[d,f]=Se(t,F.properties.write,l),[m,g]=Se(t,F.properties.read,l),[y,v]=h.useState([]);if(h.useEffect(()=>{async function C(){const b=(await t.getRights(n)).filter(k=>k.setIn!==e).sort((k,E)=>k.for===F.instances.publicAgent?-1:1);v(b)}C()},[t]),!e)return c.jsx(c.Fragment,{children:"No subject passed"});function _(C,p,w){let b=p?d:m;w?(b=b.filter(k=>k!==C),b.push(C)):b=b.filter(k=>k!==C),p?f(b):g(b)}function x(){const C=new Map;C.set(F.instances.publicAgent,{read:!1,write:!1}),m.map(b=>{C.set(b,{read:!0,write:!1})}),d.map(b=>{const k=C.get(b);C.set(b,{read:k?k.read:!1,write:!0})});const p=[];return C.forEach((b,k)=>{p.push({agentSubject:k,read:b.read,write:b.write})}),p.sort(b=>b.agentSubject===F.instances.publicAgent?-1:1)}async function S(){try{await t.save(n),lt.success("Share settings saved"),u(mt(e))}catch(C){lt.error(C.message)}}return c.jsx(Wr,{subject:e,children:c.jsx(Et,{children:c.jsxs(Ne,{children:[c.jsx(Gs,{resource:t,prefix:"Share settings",link:!0}),r&&!i&&c.jsx("span",{children:c.jsx(ue,{onClick:()=>o(!0),children:"Send Invite..."})}),i&&c.jsx(K2e,{target:t}),c.jsxs(Gr,{children:[c.jsx(Uk,{text:"rights set here:"}),c.jsx(Pd,{children:x().map(C=>c.jsx(Bk,{...C,handleSetRight:r&&t.isReady()?_:void 0},JSON.stringify(C)))})]}),r&&c.jsx("span",{children:c.jsx(ue,{disabled:!t.hasUnsavedChanges(),onClick:S,children:"Save"})}),a&&c.jsx(gt,{children:a.message}),y.length>0&&c.jsxs(Gr,{children:[c.jsx(Uk,{text:"inherited rights:"}),c.jsx(Pd,{children:y.map(C=>c.jsx(Bk,{inheritedFrom:C.setIn,read:C.type==="read",write:C.type==="write",agentSubject:C.for},C.for+C.type))})]})]})})})}function Bk({handleSetRight:e,agentSubject:t,inheritedFrom:n,read:r,write:i}){const o=t===F.instances.publicAgent,s=!ae(t).isReady()||!e;return c.jsx(Os,{children:c.jsxs("div",{style:{display:"flex"},"data-test":o?"right-public":null,children:[c.jsxs("div",{style:{flex:1},children:[o?c.jsxs(c.Fragment,{children:[c.jsx(rW,{})," Public (anyone)"," "]}):c.jsx(Ft,{subject:t}),n&&c.jsxs(c.Fragment,{children:[" (via ",c.jsx(Ft,{subject:n}),") "]})]}),c.jsxs("div",{style:{alignSelf:"flex-end"},children:[c.jsx(Hk,{type:"checkbox",disabled:s,onChange:u=>e&&e(t,!1,u.target.checked),checked:r,title:r?"Read access. Toggle to remove access.":"No read access. Toggle to give read access."}),c.jsx(Hk,{type:"checkbox",disabled:s,onChange:u=>e&&e(t,!0,u.target.checked),checked:i,title:i?"Write access. Toggle to remove access.":"No write access. Toggle to give write access."})]})]})})}const Hk=A.input.withConfig({displayName:"ShareRoute__StyledCheckbox",componentId:"sc-69211733-0"})(["width:2rem;"]);function Uk({text:e}){return c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:1,marginBottom:"1rem"},children:[c.jsx("div",{style:{flex:1,fontWeight:"bold"},children:e}),c.jsxs("div",{style:{alignSelf:"flex-end",justifyContent:"center"},children:[c.jsx("span",{children:"read "}),c.jsx("span",{children:"write"})]})]})}const X2e=()=>{const[e,t]=h.useState(""),{agent:n}=Xe(),[r]=Xm();return h.useEffect(()=>{async function i(){if(n){const o=await vx(r,n);t(btoa(JSON.stringify(o)))}}i()},[n]),c.jsx(Wr,{children:c.jsx(Et,{children:c.jsx(I0,{content:e})})})},Q2e=new Intl.DateTimeFormat("default",{month:"long",year:"numeric"});function J2e(e){const t=[];let n,r;for(let i=0;i<e.length;i++){if(n=e[i],i===0){t.push(n);continue}if(r=e[i-1],n.commit.signer!==r.commit.signer){t.push(n);continue}twe(n.resource.getPropVals(),r.resource.getPropVals())||t.push(n)}return t}async function Z2e(e,t,n){const r=t.resource.getPropVals();for(const i of e.getPropVals().keys())r.has(i)||e.removePropVal(i);for(const[i,o]of r.entries())await e.set(i,o,n);await e.save(n)}function ewe(e){return e.reduceRight((t,n)=>{const r=new Date(n.commit.createdAt),i=Q2e.format(r),o=t[i]??[];return{...t,[i]:[...o,n]}},{})}function twe(e,t){let n;if(e.size!==t.size)return!1;for(const[r,i]of e)if(n=t.get(r),n!==i||n===void 0&&!t.has(r)){if(Array.isArray(i)&&JSON.stringify(i)===JSON.stringify(n))continue;return!1}return!0}function nwe(e){const[t,n]=h.useState([]),[r,i]=h.useState(0),o=h.useRef(!1),a=be(),[s,u]=h.useTransition(),[l,d]=h.useState(!0),[f,m]=h.useState(void 0);return h.useEffect(()=>{e.getSubject()!==Nt&&(o.current||u(()=>{(async()=>{try{o.current=!0;const g=await e.getHistory(a,i),y=J2e(g);n(y)}catch(g){m(g)}finally{d(!1),o.current=!1}})()}))},[e]),{versions:t,loading:l,error:f,progress:r}}const rwe=new Intl.DateTimeFormat("default",{month:"long",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"});function kD({version:e}){const t=ae(e.commit.signer),[n]=nt(t),r=new Date(e.commit.createdAt),i=rwe.format(r);return c.jsxs("span",{children:["Editted ",c.jsx("time",{dateTime:r.toISOString(),children:i})," by"," ",c.jsx(Ve,{subject:e.commit.signer,children:n})]})}function iwe({version:e,selected:t,onClick:n}){return c.jsx(owe,{selected:t,onClick:n,about:e.commit.id,"data-testid":"version-button",children:c.jsx(I3,{date:new Date(e.commit.createdAt)})},e.commit.signature)}const owe=A(ug).withConfig({displayName:"VersionButton__VersionRow",componentId:"sc-1bc3c4bc-0"})(["padding:1rem;background-color:",";color:",";border-radius:",";contain:paint;&:hover,&:focus-visible{background-color:",";}"],e=>e.selected?e.theme.colors.main:"transparent",e=>e.selected?"white":e.theme.colors.text,e=>e.theme.radius,e=>e.selected?e.theme.colors.main:e.theme.colors.bg1);function jD({groupedVersions:e,selectedVersion:t,title:n,className:r,subject:i,persistSelection:o=!1,onNextItem:a,onPreviousItem:s,onSelectVersion:u}){const l=be(),d=h.useId();return c.jsxs(awe,{className:r,children:[c.jsx(cwe,{id:d,children:n}),c.jsx(lwe,{"aria-labelledby":d,children:c.jsx(Ne,{children:Object.entries(e).map(([f,m])=>c.jsxs(h.Fragment,{children:[c.jsx(dwe,{children:f}),[...m].map(g=>c.jsx(iwe,{onClick:()=>u(g),version:g,selected:o&&(t==null?void 0:t.commit.id)===g.commit.id},g.commit.id))]},f))})}),s&&s&&c.jsxs(uwe,{children:[c.jsx(Wt,{color:"main",title:"Previous item",onClick:s,children:c.jsx(UU,{})}),c.jsx(Wt,{title:"Next item",color:"main",onClick:a,children:c.jsx(tS,{})})]}),c.jsxs(swe,{path:RW(i,l.getServerUrl()),children:["All versions",c.jsx(tS,{size:"0.9rem"})]})]})}const awe=A.section.withConfig({displayName:"VersionScroller__ScrollerSection",componentId:"sc-b28744e-0"})(["border:1px solid ",";border-radius:",";background-color:",";min-width:12rem;max-width:20rem;display:grid;grid-template-rows:auto 1fr auto;position:relative;"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.bg),swe=A(Ve).withConfig({displayName:"VersionScroller__AllVersionsLink",componentId:"sc-b28744e-1"})(["position:absolute;bottom:-2rem;width:100%;display:flex;align-items:center;justify-content:center;gap:0.5ch;vertical-align:middle;line-height:1;"]),lwe=A.div.withConfig({displayName:"VersionScroller__Scroller",componentId:"sc-b28744e-2"})(["padding:1rem;overflow:auto;"]),cwe=A.h2.withConfig({displayName:"VersionScroller__ScrollerTitle",componentId:"sc-b28744e-3"})(["padding:","rem;margin-bottom:0;text-align:center;"],e=>e.theme.margin),uwe=A.div.withConfig({displayName:"VersionScroller__ButtonWrapper",componentId:"sc-b28744e-4"})(["padding:","rem;display:flex;justify-content:space-between;"],e=>e.theme.margin),dwe=A.h3.withConfig({displayName:"VersionScroller__GroupHeading",componentId:"sc-b28744e-5"})(["&::before{content:'';display:block;height:1px;background-color:",";}&::after{content:'';display:block;height:1px;background-color:",";}display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:0.5rem;text-align:center;color:",";"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight);function fwe({resource:e,groupedVersions:t,selectedVersion:n,isCurrentVersion:r,onNextVersion:i,onPreviousVersion:o,onSelectVersion:a,onVersionAccept:s}){return c.jsxs(c.Fragment,{children:[c.jsx(hwe,{children:c.jsxs(Ne,{fullHeight:!0,children:[c.jsx(Gs,{resource:e,prefix:"History of",link:!0}),n&&(n==null?void 0:n.resource)&&c.jsxs(c.Fragment,{children:[c.jsx(kD,{version:n}),c.jsx(pwe,{children:c.jsx(p4,{resource:n.resource})}),c.jsx(ue,{onClick:s,disabled:r,children:"Make current version"})]})]})}),c.jsx(jD,{persistSelection:!0,subject:e.getSubject(),groupedVersions:t,onNextItem:o,onPreviousItem:i,selectedVersion:n,onSelectVersion:a,title:"Versions"})]})}const pwe=A(Gr).withConfig({displayName:"HistoryDesktopView__StyledCard",componentId:"sc-22300cde-0"})(["flex:1;overflow:auto;width:100%;"]),hwe=A.div.withConfig({displayName:"HistoryDesktopView__CurrentItem",componentId:"sc-22300cde-1"})(["flex:1;& h1{margin-bottom:0;}"]);function mwe({resource:e,groupedVersions:t,selectedVersion:n,onSelectVersion:r,onVersionAccept:i}){const[o,a,s]=Cr(),u=h.useCallback(l=>{r(l),a()},[]);return c.jsxs(c.Fragment,{children:[c.jsx(vwe,{title:`History of ${e.title}`,subject:e.getSubject(),groupedVersions:t,selectedVersion:n,onSelectVersion:u}),c.jsxs(_r,{...o,children:[c.jsx(bi,{children:c.jsx("h1",{children:"Version"})}),c.jsx(Xr,{children:c.jsx(Ne,{fullHeight:!0,children:n&&(n==null?void 0:n.resource)&&c.jsxs(c.Fragment,{children:[c.jsx(kD,{version:n}),c.jsx(gwe,{children:c.jsx(p4,{resource:n.resource})})]})})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>s(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:i,children:"Make current version"})]})]})]})}const gwe=A(Gr).withConfig({displayName:"HistoryMobileView__StyledCard",componentId:"sc-2374c6b0-0"})(["overflow:auto;"]),vwe=A(jD).withConfig({displayName:"HistoryMobileView__CenteredScroller",componentId:"sc-2374c6b0-1"})(["margin-inline:auto;"]),ywe=({value:e})=>c.jsx(bwe,{value:e,max:"100"}),bwe=A.progress.withConfig({displayName:"ProgressBar__Progress",componentId:"sc-97a3e182-0"})(["--progress-bg:",";--progress-fg:",";--progress-radius:2rem;--progress-height:0.5rem;flex:1;appearance:none;overflow:hidden;border-radius:var(--progress-radius);height:var(--progress-height);background-color:var(--progress-bg);border:none;&[value]::-moz-progress-bar{background-color:var(--progress-fg);}&[value]::-webkit-progress-bar{background-color:var(--progress-bg);border-radius:var(--progress-radius);height:var(--progress-height);}&[value]::-webkit-progress-value{background-color:var(--progress-fg);}"],e=>e.theme.colors.bg1,e=>e.theme.colors.main);function wwe(){const e=be(),t=Ua(),n=kc("(max-width: 500px)"),[r]=or(),i=ae(r),{versions:o,loading:a,error:s,progress:u}=nwe(i),[l,d]=h.useState(),f=h.useMemo(()=>ewe(o),[o]);h.useEffect(()=>{o.length>0&&d(o[o.length-1])},[o]);const m=async()=>{l&&r&&(await Z2e(i,l,e),vr.success("Resource version updated"),t(mt(r)))},g=h.useCallback(()=>{const x=o.findIndex(S=>S===l);x===-1||x===o.length-1||d(o[x+1])},[o,l]),y=h.useCallback(()=>{const x=o.findIndex(S=>S===l);x===-1||x===0||d(o[x-1])},[o,l]),v=n?mwe:fwe,_=l===o[o.length-1];return a?c.jsx(Et,{children:c.jsx(Swe,{children:c.jsxs(Ne,{fullWidth:!0,children:[c.jsxs("span",{children:["Building history of ",i.title]}),c.jsxs(Le,{center:!0,fullWidth:!0,children:[c.jsx(ywe,{value:u}),c.jsxs("span",{children:[u,"%"]})]})]})})}):s?c.jsx(Et,{children:c.jsx(gt,{children:s.message})}):c.jsx(xwe,{about:r,children:c.jsx(v,{resource:i,groupedVersions:f,selectedVersion:l,isCurrentVersion:_,onNextVersion:g,onPreviousVersion:y,onSelectVersion:d,onVersionAccept:m})})}const xwe=A.main.withConfig({displayName:"HistoryRoute__SplitView",componentId:"sc-20c53c6e-0"})(["display:flex;width:100%;height:100%;height:calc(100vh - 6rem);padding:","rem;gap:","rem;& code{word-break:break-word;}"],e=>e.theme.margin,e=>e.theme.margin),Swe=A.div.withConfig({displayName:"HistoryRoute__Centered",componentId:"sc-20c53c6e-1"})(["display:grid;place-items:center;height:100dvh;min-width:100%;"]),Cwe=window.location.origin,Wk=!1;function _we(){return c.jsxs(CL,{children:[c.jsx(En,{path:Fe.new,element:c.jsx(a2e,{})}),c.jsx(En,{path:Fe.themeSettings,element:c.jsx(j2e,{})}),c.jsx(En,{path:Fe.agentSettings,element:c.jsx(T2e,{})}),c.jsx(En,{path:Fe.serverSettings,element:c.jsx(G2e,{})}),c.jsx(En,{path:Fe.shortcuts,element:c.jsx(A2e,{})}),c.jsx(En,{path:Fe.data,element:c.jsx(P2e,{})}),c.jsx(En,{path:Fe.edit,element:c.jsx(R2e,{})}),c.jsx(En,{path:Fe.import,element:c.jsx(SO,{})}),c.jsx(En,{path:Fe.share,element:c.jsx(Y2e,{})}),c.jsx(En,{path:Fe.show,element:c.jsx(Zbe,{})}),c.jsx(En,{path:Fe.about,element:c.jsx(yD,{})}),c.jsx(En,{path:Fe.search,element:c.jsx(vD,{})}),c.jsx(En,{path:Fe.token,element:c.jsx(X2e,{})}),c.jsx(En,{path:Fe.history,element:c.jsx(wwe,{})}),Wk,Wk,c.jsx(En,{path:"/",element:c.jsx(R4,{subject:Cwe})}),c.jsx(En,{path:"*",element:c.jsx(I2e,{})})]})}const ED=({onClick:e,isActive:t,menuId:n},r)=>c.jsx(Qp,{"aria-controls":n,selected:t,ref:r,title:`Open menu (${ot.menu})`,type:"button","data-test":"context-menu",onClick:e,rightPadding:!0,children:c.jsx(ag,{})});ED.displayName="MenuBarDropdownTrigger";const kwe=()=>{const e=h.useRef(null);return[e,()=>{e.current&&e.current.focus()}]};function jwe({onFocus:e,onBlur:t,subject:n}){const[r,i]=h.useState(""),[o]=W9(),{scope:a,clearScope:s}=gg(),[u,l]=kwe(),d=xt();function f(y){y.target.select()}function m(y){i(y.target.value);try{bn.tryValidSubject(y.target.value),d(mt(y.target.value),{replace:!0})}catch{d(CW(y.target.value,a),{replace:!0})}}const g=y=>{n&&(y.preventDefault(),u.current.blur(),document.activeElement.blur(),d(mt(n)))};return Me(ot.search,y=>{y.preventDefault(),u.current.select(),l()}),Me("esc",y=>{y.preventDefault(),u.current.blur()},{enableOnTags:["INPUT"]}),Me("backspace",y=>{(r===void 0||r.length===0)&&a&&s()},{enableOnTags:["INPUT"]}),h.useEffect(()=>{i(o||n),(o||a)&&l()},[o,a,n]),c.jsxs(Rwe,{onSubmit:g,autoComplete:"off",children:[a&&c.jsx(Ewe,{subject:a,onClick:s}),c.jsx(gw,{autoComplete:"false",ref:u,type:"search","data-test":"address-bar",name:"search","aria-label":"Search",onClick:f,onFocus:e,onBlur:t,value:r||"",onChange:m,placeholder:'Enter an Atomic URL or search (press "/" )'})]})}function Ewe({subject:e,onClick:t}){const n=ae(e),[r]=nt(n);return c.jsxs(Pwe,{children:[c.jsxs("span",{children:["in:",r," "]}),c.jsx(Wt,{onClick:t,title:"Clear scope",variant:Pa.Fill,color:"textLight",size:"0.8rem",children:c.jsx(lo,{})})]})}const gw=A.input.withConfig({displayName:"Searchbar__Input",componentId:"sc-30826e97-0"})(["border:none;font-size:0.9rem;padding:0.4rem 1.2rem;color:",";width:100%;flex:1;min-width:1rem;background-color:",";outline:none;color:",";"],e=>e.theme.colors.text,e=>e.theme.colors.bg,e=>e.theme.colors.textLight),Rwe=A.form.withConfig({displayName:"Searchbar__Form",componentId:"sc-30826e97-1"})(["flex:1;height:100%;display:flex;align-items:center;padding-inline:1rem;border-radius:999px;:hover{",";","{color:",";}}:focus-within{","{color:",";}outline:none;}"],e=>Ra(.6,e.theme.colors.main),gw,e=>e.theme.colors.text,gw,e=>e.theme.colors.text),Pwe=A.span.withConfig({displayName:"Searchbar__Tag",componentId:"sc-30826e97-2"})(["background-color:",";border-radius:",";padding:0.2rem 0.5rem;display:flex;flex-direction:row;align-items:center;gap:0.3rem;span{max-width:15ch;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"],e=>e.theme.colors.bg1,e=>e.theme.radius);function Awe({children:e}){const{navbarTop:t,navbarFloating:n}=Xe(),r=h.useRef(null),i=Ms();return h.useEffect(()=>{var o;(o=r==null?void 0:r.current)==null||o.scrollTo(0,0)},[i]),c.jsxs(c.Fragment,{children:[t&&c.jsx(Vk,{}),c.jsxs(Dwe,{children:[c.jsx(lX,{}),c.jsxs(Iwe,{ref:r,navbarTop:t,navbarFloating:n,children:[c.jsx(sm,{position:"top"}),e]})]}),!t&&c.jsx(Vk,{})]})}const Iwe=A.div.withConfig({displayName:"Navigation__Content",componentId:"sc-4e607a1-0"})(["display:block;flex:1;overflow-y:auto;"]);function Vk(){const[e]=or(),t=Ua(),{navbarTop:n,navbarFloating:r,sideBarLocked:i,setSideBarLocked:o}=Xe(),[a,s]=h.useState(!0),u=kc("(display-mode: standalone) or (display-mode: fullscreen)"),l=h.useMemo(()=>u||window.navigator.standalone||document.referrer.includes("android-app://")||X9(),[u]);function d(m){m.target.getBoundingClientRect().width<280&&s(!1)}const f=r?Twe:Owe;return c.jsxs(f,{top:n,"aria-label":"search",floating:r,children:[a&&c.jsxs(c.Fragment,{children:[c.jsx(Qp,{leftPadding:!0,type:"button",onClick:()=>o(!i),title:`Show / hide sidebar (${ot.sidebarToggle})`,"data-test":"sidebar-toggle",children:c.jsx(LU,{})}),l&&c.jsxs(c.Fragment,{children:[c.jsx(Qp,{type:"button",title:"Go back",onClick:()=>t(-1),children:c.jsx(ig,{})})," ",c.jsx(Qp,{type:"button",title:"Go forward",onClick:()=>t(1),children:c.jsx(D9,{})})]})]}),c.jsx(jwe,{subject:e,onFocus:d,onBlur:()=>s(!0)}),a&&e&&c.jsx(Cg,{isMainMenu:!0,subject:e,trigger:ED})]})}const RD=A.div.withConfig({displayName:"Navigation__NavBarBase",componentId:"sc-4e607a1-1"})(["position:fixed;z-index:",";height:2.5rem;display:flex;border:solid 1px ",";background-color:",";view-transition-name:navbar;"],e=>e.theme.zIndex.sidebar,e=>e.theme.colors.bg2,e=>e.theme.colors.bg),Twe=A(RD).withConfig({displayName:"Navigation__NavBarFloating",componentId:"sc-4e607a1-2"})(["box-shadow:",";border-radius:999px;overflow:hidden;max-width:calc(100% - 2rem);width:","rem;margin:auto;left:50%;margin-left:-","rem;margin-right:-","rem;top:",";bottom:",";&:has(input:focus){box-shadow:0px 0px 0px 1px ",";border-color:",";}@media (max-width:","rem){max-width:calc(100% - 1rem);left:auto;right:auto;margin-left:0.5rem;bottom:0.5rem;}"],e=>e.theme.boxShadow,e=>e.theme.containerWidth+1,e=>(e.theme.containerWidth+1)/2,e=>(e.theme.containerWidth+1)/2,e=>e.top?"2rem":"auto",e=>e.top?"auto":"1rem",e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.containerWidth),Owe=A(RD).withConfig({displayName:"Navigation__NavBarFixed",componentId:"sc-4e607a1-3"})(["top:",";bottom:",";left:0;right:0;border-width:0;border-bottom:",";border-top:",";&:has(input:focus){box-shadow:0px 0px 0px 2px ",";}"],e=>e.top?"0":"auto",e=>e.top?"auto":"0",e=>e.top?"solid 1px "+e.theme.colors.bg2:"none",e=>e.top?"none":"solid 1px "+e.theme.colors.bg2,e=>e.theme.colors.main),Dwe=A("div").withConfig({displayName:"Navigation__SideBarWrapper",componentId:"sc-4e607a1-4"})(["display:flex;height:100vh;position:fixed;top:0;bottom:0;left:0;right:0;"]);function Nwe(){const{mainColor:e,darkMode:t}=Xe(),[n]=or(),r=ae(n);let[i]=nt(r),[o]=re(r,K.description);const a=r.isReady()&&r.getSubject()!==Nt;return i=a&&i?i:"Atomic Data",o=a&&o?o:"The easiest way to create and share linked data.",c.jsxs(zp,{children:[c.jsx("title",{children:i}),c.jsx("meta",{name:"theme-color",content:t?"black":"white"}),c.jsx("meta",{name:"theme-color",content:t?"black":"white"}),c.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:t?"black":"default"}),c.jsx("meta",{name:"msapplication-TileColor",content:e}),c.jsx("meta",{name:"description",content:o}),c.jsx("meta",{property:"og:title",content:i}),c.jsx("meta",{property:"og:description",content:o}),c.jsx("meta",{property:"og:url",content:n})]})}function Mwe(){const e=rH();return c.jsx(RU,{position:"bottom-right",toastOptions:{style:{zIndex:EP.toast,background:e.colors.bg,color:e.colors.text,wordBreak:"break-word"}},children:t=>c.jsx(I9,{toast:t,style:{...t.style,border:`solid 1px ${e.colors.bg2}`,position:"relative",animation:t.visible?"toast-enter .5s ease":"toast-exit 1s ease"},children:({icon:n,message:r})=>c.jsx($we,{icon:n,message:r,t})})})}function $we({icon:e,message:t,t:n}){let r=t.props.children;function i(){lt.success("Copied error to clipboard"),navigator.clipboard.writeText(t.props.children),lt.dismiss(n.id)}return r.length>100&&(r=r.substring(0,100)+"..."),c.jsxs(c.Fragment,{children:[e,r,n.type!=="loading"&&c.jsxs("div",{style:{flex:1,flexDirection:"column"},children:[c.jsx(ue,{title:"Clear",subtle:!0,onClick:()=>lt.dismiss(n.id),children:c.jsx(lo,{})}),n.type!=="success"&&c.jsx(ue,{title:"Copy",subtle:!0,onClick:i,children:c.jsx(Lx,{})})]})]})}const Lwe=({children:e})=>{const t=h.useRef(null);return c.jsxs(i3.Provider,{value:t,children:[e,c.jsx(Fwe,{ref:t})]})},Fwe=A.div.withConfig({displayName:"DialogContainer__StyledDiv",componentId:"sc-8f572942-0"})(["display:contents;"]),vw="agent";function zwe(){const e=localStorage.getItem(vw);if(e)try{return Lh.fromSecret(e)}catch(t){console.error(t);return}}function Bwe(e){e?localStorage.setItem(vw,e.buildSecret()):localStorage.removeItem(vw)}const Hwe=e=>{jP(e);const t=e.message;lt.error(t)};function Uwe(e){return async t=>{const n=t.get(F.properties.parent);if(!ls(n))throw new Error(`Resource doesn't have a parent: ${t.getSubject()} `);const r=await e.getResourceAsync(n);r.getSubjects(F.properties.subResources).includes(t.getSubject())||(await r.pushPropVal(F.properties.subResources,[t.getSubject()]),await r.save(e))}}function Wwe(e){return async t=>{const n=t.get(F.properties.parent);if(!ls(n))throw new Error(`Resource doesn't have a parent: ${t.getSubject()} `);const r=await e.getResourceAsync(n),i=r.getSubjects(F.properties.subResources);i.length>0&&(await r.set(F.properties.subResources,i.filter(o=>o!==t.getSubject()),e),await r.save(e))}}function Vwe(e){e.on($r.ResourceManuallyCreated,Uwe(e)),e.on($r.ResourceRemoved,Wwe(e)),e.on($r.Error,Hwe),e.on($r.AgentChanged,Bwe)}function qwe(e){return fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8 23.64 7zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.49.01.01.01-.01 3.9-4.86 3.32 3.32 1.27-1.27-3.46-3.46z"}}]})(e)}function Gwe(){const[e,t]=h.useState(navigator.onLine);return h.useEffect(()=>{const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}},[]),e}function Kwe(){const e=Gwe();return h.useEffect(()=>{e||lt.error("You are offline, changes might not be persisted.")},[e]),c.jsx(Xwe,{shown:!e,children:c.jsx(qwe,{title:"No Internet Connection."})})}const Ywe=$o(["0%{opacity:1;filter:drop-shadow(0 0 5px var(--shadow-color));}100%{opacity:0.8;filter:drop-shadow(0 0 0 var(--shadow-color));}"]),Xwe=A.div.withConfig({displayName:"NetworkIndicator__Wrapper",componentId:"sc-da2149ad-0"})(["--shadow-color:",";position:fixed;bottom:1.2rem;right:2rem;z-index:",";font-size:1.5rem;color:",";pointer-events:",";transition:opacity 0.1s ease-in-out;opacity:",";background-color:",";border:1px solid ",";border-radius:50%;display:grid;place-items:center;box-shadow:",";padding:0.5rem;svg{animation:"," 1.5s alternate ease-in-out infinite;animation-play-state:",";}"],e=>Ii(.15,e.theme.colors.alert),({theme:e})=>e.zIndex.networkIndicator,e=>e.theme.colors.alert,e=>e.shown?"auto":"none",e=>e.shown?1:0,e=>e.theme.colors.bg,e=>e.theme.colors.alert,e=>e.theme.boxShadowSoft,Ywe,e=>e.shown?"running":"paused");function Qwe(){return c.jsx(Jwe,{href:"#skip-to-content",children:"Skip Navigation?"})}const Jwe=A.a.withConfig({displayName:"SkipNav__SkipLink",componentId:"sc-635e15f2-0"})(["display:flex;justify-content:center;align-items:center;--skip-button-width:min(90vw,20rem);position:absolute;width:100vw;background:",";z-index:100;box-shadow:",";border:none;padding:1rem;color:white;font-size:1.5rem;pointer-events:none;top:-10rem;&:focus{top:1rem;}"],({theme:e})=>e.colors.main,({theme:e})=>e.boxShadowSoft),Zwe=()=>{Qf(Be.classes.folder,async(e,t)=>{await t(Be.classes.folder,{[ve.properties.name]:"Untitled Folder",[Be.properties.displayStyle]:ft.displayStyles.list},e)}),Qf(Be.classes.chatroom,async(e,t)=>{await t(Be.classes.chatroom,{[ve.properties.name]:"Untitled ChatRoom"},e)}),Qf(Be.classes.document,async(e,t)=>{t(Be.classes.document,{[ve.properties.name]:"Untitled Document"},e)}),Qf(xa.classes.drive,async(e,t,{store:n,settings:r})=>{const i=n.getAgent();if(!i||i.subject===void 0)throw new Error("No agent set in the Store, required when creating a Drive");const o=await t(xa.classes.drive,{[ve.properties.write]:[i.subject],[ve.properties.read]:[i.subject]}),a=await n.getResourceAsync(i.subject);a.pushPropVal(xa.properties.drives,[o.getSubject()]),a.save(n),r.setDrive(o.getSubject())})};function exe(e){return/^[http://|https://]/i.test(e)?e:`https://${e}`}const txe=({parent:e,onClose:t})=>{const[n,r]=h.useState(""),[i,o,a]=Cr({onCancel:t}),s=_c(),u=h.useCallback(l=>{l.preventDefault();const d=exe(n);s(Be.classes.bookmark,{[ve.properties.name]:"New Bookmark",[Be.properties.url]:d},e),t()},[n,t]);return h.useEffect(()=>{o()},[]),c.jsxs(_r,{...i,children:[c.jsx(bi,{children:c.jsx("h1",{children:"New Bookmark"})}),c.jsx(Xr,{children:c.jsx("form",{onSubmit:u,children:c.jsx(Hn,{required:!0,label:"url",children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"https://example.com",value:n,autoFocus:!0,onChange:l=>r(l.target.value)})})})})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>a(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:u,disabled:n.trim()==="",children:"Ok"})]})]})},nxe=({parent:e,onClose:t})=>{const[n,r]=h.useState(""),[i,o]=h.useState(!1),a=_c(),s=h.useCallback(async()=>{a(ve.classes.ontology,{[ve.properties.shortname]:n,[ve.properties.description]:"description",[ve.properties.classes]:[],[ve.properties.properties]:[],[ve.properties.instances]:[]},e),t()},[n,a,t,e]),[u,l,d]=Cr({onSuccess:s,onCancel:t}),f=m=>{const g=Bs(m.target.value);r(g);try{za(g,Z.SLUG),o(!0)}catch{o(!1)}};return h.useEffect(()=>{l()},[]),c.jsxs(_r,{...u,children:[c.jsx(rxe,{children:"New Ontology"}),c.jsx(Xr,{children:c.jsxs("form",{onSubmit:m=>{m.preventDefault(),d(!0)},children:[c.jsx(ixe,{children:"An ontology is a collection of classes and properties that together describe a concept. Great for data models."}),c.jsx(Hn,{required:!0,label:"Shortname",children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"my-ontology",value:n,autoFocus:!0,onChange:f})})})]})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:()=>d(!0),disabled:!i,children:"Create"})]})]})},rxe=A.h1.withConfig({displayName:"NewOntologyDialog__H1",componentId:"sc-9da5b6cb-0"})(["margin:0;"]),ixe=A.p.withConfig({displayName:"NewOntologyDialog__Explanation",componentId:"sc-9da5b6cb-1"})(["color:",";max-width:60ch;"],e=>e.theme.colors.textLight);function oxe(){return c.jsx(axe,{children:"BETA"})}const axe=A.span.withConfig({displayName:"BetaBadge__Badge",componentId:"sc-98d0b90b-0"})(["background-color:",";border-radius:0.25rem;color:white;font-weight:bold;padding-inline:0.25rem;box-shadow:0px 3px 5px rgba(0,0,0,0.25);"],e=>e.theme.colors.main),sxe={newResource:!0},lxe=({parent:e,onClose:t})=>{const n=be(),[r]=h.useState(()=>n.createSubject("class")),i=ae(r,sxe),[o,a]=h.useState(""),s=_c(),u=h.useCallback(()=>{i.destroy(n),t()},[t,i,n]),l=h.useCallback(async()=>{await i.set(ve.properties.shortname,Bs(o),n),await i.set(ve.properties.description,`Represents a row in the ${o} table`,n),await i.set(ve.properties.isA,[ve.classes.class],n),await i.set(ve.properties.parent,e,n),await i.set(ve.properties.recommends,[ve.properties.name],n),await i.save(n),s(Be.classes.table,{[ve.properties.name]:o,[ve.properties.classtype]:i.getSubject()},e),t()},[o,i,n,t,e]),[d,f,m]=Cr({onCancel:u,onSuccess:l});return h.useEffect(()=>{f()},[]),c.jsxs(_r,{...d,children:[c.jsxs(uxe,{children:[c.jsx("h1",{children:"New Table"}),c.jsx(oxe,{})]}),c.jsx(cxe,{children:c.jsx("form",{onSubmit:g=>{g.preventDefault(),m(!0)},children:c.jsx(Hn,{required:!0,label:"Name",children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"New Table",value:o,autoFocus:!0,onChange:g=>a(g.target.value)})})})})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>m(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:()=>m(!0),disabled:o.trim()==="",children:"Create"})]})]})},cxe=A(Xr).withConfig({displayName:"NewTableDialog__WiderDialogContent",componentId:"sc-4300c480-0"})(["width:min(80vw,20rem);"]),uxe=A(bi).withConfig({displayName:"NewTableDialog__RelativeDialogTitle",componentId:"sc-4300c480-1"})(["display:flex;align-items:flex-start;gap:1ch;"]),dxe=({parent:e,onClose:t})=>{const[n,r]=h.useState("New Collection"),[i,o]=h.useState(),[a,s]=h.useState(),[u,l,d]=Cr({onCancel:t}),f=_c(),m=h.useCallback(g=>{g.preventDefault(),f(eo.classes.collection,{[ve.properties.name]:n,[eo.properties.value]:i,[eo.properties.property]:a,[eo.properties.pageSize]:30,[eo.properties.currentPage]:0},e),t()},[i,t,a]);return h.useEffect(()=>{l()},[]),c.jsxs(_r,{...u,children:[c.jsx(bi,{children:c.jsx("h1",{children:"New Collection"})}),c.jsx(Xr,{children:c.jsxs("form",{onSubmit:m,children:[c.jsx(Hn,{required:!0,label:"name",children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"Name your Collection",value:n,autoFocus:!0,onChange:g=>r(g.target.value)})})}),c.jsx(Hn,{label:"property",children:c.jsx("div",{children:c.jsx(Ho,{isA:ve.classes.property,setSubject:s,value:a})})}),c.jsx(Hn,{label:"value",children:c.jsx(ht,{children:c.jsx(wt,{placeholder:"Set a value filter (optional)",value:i,onChange:g=>o(g.target.value)})})})]})}),c.jsxs(Wi,{children:[c.jsx(ue,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),c.jsx(ue,{onClick:m,disabled:!a&&!i,children:"Ok"})]})]})},fxe=()=>{Xf(Be.classes.bookmark,txe),Xf(ve.classes.ontology,nxe),Xf(Be.classes.table,lxe),Xf(eo.classes.collection,dxe)},pxe=()=>{fxe(),Zwe()};const hxe=window.location.origin,mxe=zwe(),N0=new GE({agent:mxe,serverUrl:hxe});N0.parseMetaTags();const gxe=window.bugsnagApiKey?yX(window.bugsnagApiKey):x0;N0.preloadPropsAndClasses();pxe();Vwe(N0);function vxe(e,t){return typeof t=="string"?rB(e):!0}function yxe(){return c.jsx(t9.Provider,{value:N0,children:c.jsx(bX,{children:c.jsx(Pl,{children:c.jsx(jL,{basename:"/",children:c.jsx(hV,{children:c.jsx(dV,{children:c.jsx(ZB,{shouldForwardProp:vxe,children:c.jsxs(xX,{children:[c.jsx(_X,{}),c.jsx(gxe,{FallbackComponent:yT,children:c.jsxs(Hg,{onValidationChange:()=>{},children:[c.jsx(Mwe,{}),c.jsx(Nwe,{}),c.jsx(Kb,{children:c.jsxs(Lwe,{children:[c.jsx(WR,{children:c.jsx(Kb,{children:c.jsxs(iY,{children:[c.jsx(Qwe,{}),c.jsx(Awe,{children:c.jsx(_we,{})})]})})}),c.jsx(Kwe,{})]})})]})})]})})})})})})})})}const bxe=sE(document.getElementById("root"));bxe.render(c.jsx(h.StrictMode,{children:c.jsx(yxe,{})}));export{wg as $,Rye as B,Z as D,rH as J,te as P,le as R,wxe as _,Vg as a,md as b,jd as c,hd as d,gie as e,H3 as f,qk as g,Moe as h,Loe as i,pe as j,zb as k,c as l,nr as m,h3 as n,re as o,be as p,OA as q,h as r,A as s,Ga as t,F as u,Be as v,a5 as w,Wn as x,a3 as y};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ["assets/chunk_index.js","assets/index2.css","assets/chunk_OntologyGraph.js","assets/OntologyGraph.css"]
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
//# sourceMappingURL=index.js.map